SetValue macro on subform

  • Thread starter Thread starter Volta
  • Start date Start date
V

Volta

I attached a SetValue macro to an "On Enter" event procedure for a field on
a subform. When I am working with the subform independent of the "master"
form that it is linked to, the macro works fine. But if I then access the
subform through its "master" form, it does not recognize the name of the
subform used in building the macro.
 
A subform is not open in its own right, i.e. it is not part of the Forms
collection.

The easiest solution would be set the On Enter property to [Event Procedure]
instead of a macro. In the code window, add the line:
[PutTheNameOfYourControlHere] = 9999
If it is text, but the value in quotes.
 
Thank you Mr. Browne! It is working! I appreciate your time in responding.

Allen Browne said:
A subform is not open in its own right, i.e. it is not part of the Forms
collection.

The easiest solution would be set the On Enter property to [Event Procedure]
instead of a macro. In the code window, add the line:
[PutTheNameOfYourControlHere] = 9999
If it is text, but the value in quotes.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Volta said:
I attached a SetValue macro to an "On Enter" event procedure for a field on
a subform. When I am working with the subform independent of the "master"
form that it is linked to, the macro works fine. But if I then access the
subform through its "master" form, it does not recognize the name of the
subform used in building the macro.
 
Back
Top