setting up default values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to set default values in a form based on an different table and
it does not seem to work. I am entering a value from the first column into a
space on the form and want the program to default check boxes based on a
table.
 
The reason why it's not working is default values are calculated on the
moment a new record is created, at which time you have not yet filled in the
control ("space" ?) whose value they are supposed to depend on. This is not
the right way to do it.

If you want those checkboxes just for display purposes on the form, then
your expression returning the value by looking at the control on the form
and the table must go in the checkbox's ControlSource property, not the
default value.

If, on the contrary, you want to store those values in a table (so, not just
display them), the above will not work; you need to use the ControlSource
property to bind the checkboxes to table fields, so they can be stored. In
this case you need to use an appropriate event of the user-filled-in
control, such as the After Update event, to run either (a) a macro with
SetValue actions with DLookup expressions, or (b) some VBA code to do the
same.

HTH,
Nikos
 
Back
Top