How can my newly opened form know which button was clicked to open it??

  • Thread starter Thread starter tlyczko
  • Start date Start date
T

tlyczko

Hello,

I've been working all day on a database project, now I'm almost ready
to work on my startup form which is called when the DB opens.

I have one main form with one subform.

I want the main form or the subform or both forms to be locked or
editable *depending* on which command button was clicked from the
startup form.

How do I do this??

Thank you,
:) Tom
 
Easiest way will be to use the OpenArgs property to tell the difference...
e.g....

DoCmd.OpenForm "sdfds", , , , , , "abcde"

....and then, in the form....

if me.OpenArgs="abcde" then
 
Thank you!!

I have seen OpenArgs before but did not know what it was, what it could
be used for, etc.

Thank you,
:) tom
 
Back
Top