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

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
 
R

Rob Oldfield

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
 
T

tlyczko

Thank you!!

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

Thank you,
:) tom
 

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