cgosbee
Posts: 23
|
| Posted: 10/18/2007, 2:38 PM |
|
I have a record maintenance form that has two controls, one a label, the other a listbox, and only one should be visible depending on the mode.
If in EditMode, the label is shown, and in Insert mode, the listbox is shown. (Using the Visible property)
This works perfectly for Insert.
On Update, when submitting, I get an error indicating that the listbox (well, it's bound field, I guess) is a required field.
The update SQL Statement doesn't actually require the value in that listbox, it is only a required field for Inserts.
Is there a way to change the "Required" property on the Listbox in code? I don't see it in the list of available run-time properties, and none of the methods seem to apply. If not... how can I work around this?
|
 |
 |
mamboBROWN
Posts: 1713
|
| Posted: 10/18/2007, 9:41 PM |
|
cgosbee
You could turn the required property off and use the insert/update events to check the validity of the field based on the mode of the form.
|
 |
 |
|