form fields programming

N

Nicole

I currently have two forms the first I enter in a permit
number then my command button open up the other form. I
would like for this form that opens up to have the permit
number from the first form is there a way to do this?
Thanks
 
P

PC Datasheet

Hi Nicole,

Put this code in the OnClick event of the commandbutton:

DoCmd.OpenForm "NameOfForm2",,,,,,Me!PermitNumber

Put this code in the OnOpen event of Form2:

Me!PermitNumber = Me.OpenArgs

You're putting the PermitNumber in the OpenArgs parameter of the DoCmd.OpenForm
statement and passing PermitNumber to Form2.
 
J

Jeff Boyce

Nicole

Just curious (the previous responder offered a solution). Are your two
forms bound to different tables? If so, is there an underlying business
need for storing the Permit# twice?

Good luck

Jeff Boyce
<Access MVP>
 

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