it will send the name of the form to the function without having to type in each form. It even works with sub forms. I tried it on a subform in a database I'm putting together.
Now I'm trying to figure out how I can do the same for a field name.
Michael JohnsonOP
@Reply 4 years ago
The only way I found to pass the name of the field in a function (so far) is using:
[screen].[activecontrol].[Name]
Fortunately it works in my case since I'm clicking on that field. Still not sure how you'd do it globally without having it as the "active control" in this case.
Kevin Yip
@Reply 4 years ago
You can easily reference any control on a form (when it's opened) if you know the form's name and if you have the form's object.
If you know the name of an opened form, then you can reference its controls with: Forms![My Form's Name]![My Control's Name]
If a form's object is F, you can reference its controls with: F![My Control's Name]
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Large Check Box.