Using a checkbox to get a value from a table.

whitelockben

Registered User.
Local time
Today, 21:48
Joined
Jun 29, 2011
Messages
25
Hi all,

I want to use a combination of two checkboxes to retrieve a value from a table however that table is quite complex.

My table consists of four fields:

'Flower', 'NumberofFlowers', 'Weight1' and 'Weight2'.

E.g.

Select type of flower in combobox, and then the number of flowers.

If 'checkbox1' is ticked/true go to 'table 1', find row with the selected flower and number of flowers and get info from 'Weight1'.

If 'checkbox2' is ticked/true go to 'table 1', find row with the selected flower and number of flowers and get info from 'Weight2'.

I then want this value to be inserted into a new field with the new record being made.

Can anyone help me with this please?

Thank you in advance,

Ben.
 
Hi ,
Are you sure you want 2 check boxes, and not an option control?

Sounds like you can have either "weight 1" or "weight 2".

But I am not convinced you want an extra field - the value in this field is easily calculated from the other existing 4 fields, and so this doesn't make for efficient data storage.

I would create the field first in table design view, then calculate a value, then update the record accordingly.
You can probably use the macro builder, if you add in a control button to the form and use it's click event to update the field value
 

Users who are viewing this thread

Back
Top Bottom