P
Proko
Not sure if this is the best method to do this so any help would be
appreciated. I have a form with a subform that is used for data edits and
data entry. When the main form opens I want to check if we are in edit mode
or new record mode by checking if the mainform autonumber field, ID, is null.
If ID is not null then no problem. But if it is null then I want to disable
the subform so that the user cannot start entering data into it. I want the
subform to be disabled until the user enters something on the mainform to
generate an ID number.
On the 'on current' event of the mainform I have:
If IsNull(ID) then
Me!Sub_MaterialList.Form.Enabled = False
End if
When the form is opened in edit mode I get a run-time error 2465 message.
Is my syntax wrong or is it impossible to set a subform's enabled property
to false?
Is there a better way of doing this?
appreciated. I have a form with a subform that is used for data edits and
data entry. When the main form opens I want to check if we are in edit mode
or new record mode by checking if the mainform autonumber field, ID, is null.
If ID is not null then no problem. But if it is null then I want to disable
the subform so that the user cannot start entering data into it. I want the
subform to be disabled until the user enters something on the mainform to
generate an ID number.
On the 'on current' event of the mainform I have:
If IsNull(ID) then
Me!Sub_MaterialList.Form.Enabled = False
End if
When the form is opened in edit mode I get a run-time error 2465 message.
Is my syntax wrong or is it impossible to set a subform's enabled property
to false?
Is there a better way of doing this?