How do i refer to the active form

homer2002

Registered User.
Local time
Today, 04:25
Joined
Aug 27, 2002
Messages
152
Hi

Can anyone tell me the syntax to refer to the current form.

I have a form that will be copied from time to time to make similar forms.

however i've been pointing to them using there names

e.g.

forms![nameofform].[combo_acombobox].value

and i would like to be able to use a more generic syntax such as

forms!me.combo_acombobox.value

so that when I change the name of the form I don't need to hack the code around to suit

thanks in advance to the quickest typer :-)
 
If you are refering to objects on the current form, then you can get away with "me.objectname" etc.

eg: me.text1 = me.text2 + me.text3

If, however, you have comboboxes etc that refer to the form in the rowsource (forms!formname.object etc) then I am not aware of any way to reference the current form regardless of name.

Looks like a bit more "code hacking" might be in store.

Brad.
 

Users who are viewing this thread

Back
Top Bottom