Object Identification

G

ghickman07

I have several subforms which share a common source object, which is another
form. I need to assign separate default values to a text box within each
subform. I can't simply change the default value in the source, otherwise the
subforms would all have the same default value.

Is there a way to identify the object in which your form is loading? My idea
is to make some 'On Load' code or 'On Open' code for the source object. In
such code, I need to be able to identify which object it is being loaded in.
Using this identifier, I can then assign a default value for the text box at
the end of the code. Does anyone know how to do this or can offer an
alternative solution?
 
D

Daryl S

Ghickman07 -

If you are looking for the name of the parent form (that is, the form that
the subform is on), then you can get it with this:

Me.Parent.Name
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top