Yes/No field in make-table query (1 Viewer)

Big Pat

Registered User.
Local time
Today, 18:07
Joined
Sep 29, 2004
Messages
555
Hi,

I need to run a make-table query to add certain records form one table into another. Is there a way to make a new Yes/No field in this new table which is NOT based on any field in the first table? Basically each new record should have a tick-box field, called 'PaidFor', defaulting to "not-ticked" when the query is run.

I've tried adding 'PaidFor:0' and 'PaidFor:No' and though these add the correct logical values to records in the new table, when I create a form based on that table, I can't seem to format the new field as a tick-box, whci is what I really need to do.

Can anyone advise how I should approach this?
 

apr pillai

AWF VIP
Local time
Today, 22:37
Joined
Jan 20, 2005
Messages
735
You cannot create a CheckBox Field directly through the Make-Table Query. But , I used to create a Yes/No new Field with the expression like PaidFor:Cbool(0) (Cbool() stands for Convert to Boolean data type. But the output field will be created as a Number Field (integer type).

On the Form you can create this as a CheckBox field.

1. Remove the Field you have directly created on the Form from the Table Field.

2. Select the CheckBox Control from ToolBox and draw a Checkbox control where you want it to appear on the Form.

3. Display its Property Sheet (View - ->Properties) and change the Control Source Property value to the PaidFor field name.

It will work as a Checkbox. The data recorded will be -1 for Yes and 0 for No
 

Users who are viewing this thread

Top Bottom