G
Guest
Hi,
I have a subform (SubFrmA) on a main form (FormA). I have a combo box on
the subform. In the Not In List property of the combo box I have an Event
Procedure which advises the user that the selection they've just made is not
in the list, and would they like to update the table which drives the combo
box. If the user selects yes, another form (FormUpdate) is opened, which is
simply the aforementioned table in continuous form view. The user can also
access FormUpdate through a switchboard from.
I'd like to have certain buttons enabled and properties set depending on how
the user accesses FormUpdate. If through the main switchboard then the form
would have all its buttons enabled and would open as DataEntry = No. If
through the Not In List event then the Add New Record would be disabled
(because I've already set this property to Yes using the DoCmd.OpenForms
method in the Not In List event).
What I'd done is this: I've placed an unbound field (txtUnbound) on SubFrmA.
In the NotInList event, when the user clicks Yes, prior to opening the
FormUpdate form the event runs a macro which uses the SetValue command to set
a value of 1 in the unbound field. Then, in the OnOpen event of FormUpdate I
have an IF statement which enables/disables the AddNewRecords button if the
unbound field on SubFrmA = 1. I'm having trouble doing this - I get a
message stating something along the lines of what I trying to do is not
supported. Here's how I'm referencing the txtUnbound field:
If Forms!FormA.SubFormA.txtUnbound = 1 then
Do I have the syntax right? How do I reference a field on other
form/subforms from a form?
Any help would be appreciated.
Thanks,
Manuel
I have a subform (SubFrmA) on a main form (FormA). I have a combo box on
the subform. In the Not In List property of the combo box I have an Event
Procedure which advises the user that the selection they've just made is not
in the list, and would they like to update the table which drives the combo
box. If the user selects yes, another form (FormUpdate) is opened, which is
simply the aforementioned table in continuous form view. The user can also
access FormUpdate through a switchboard from.
I'd like to have certain buttons enabled and properties set depending on how
the user accesses FormUpdate. If through the main switchboard then the form
would have all its buttons enabled and would open as DataEntry = No. If
through the Not In List event then the Add New Record would be disabled
(because I've already set this property to Yes using the DoCmd.OpenForms
method in the Not In List event).
What I'd done is this: I've placed an unbound field (txtUnbound) on SubFrmA.
In the NotInList event, when the user clicks Yes, prior to opening the
FormUpdate form the event runs a macro which uses the SetValue command to set
a value of 1 in the unbound field. Then, in the OnOpen event of FormUpdate I
have an IF statement which enables/disables the AddNewRecords button if the
unbound field on SubFrmA = 1. I'm having trouble doing this - I get a
message stating something along the lines of what I trying to do is not
supported. Here's how I'm referencing the txtUnbound field:
If Forms!FormA.SubFormA.txtUnbound = 1 then
Do I have the syntax right? How do I reference a field on other
form/subforms from a form?
Any help would be appreciated.
Thanks,
Manuel