Passing Parms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

Is there a better way to pass parm's from one form to another? Right now
all I can think to do is a dlookup once the second form is called back to the
first form.

I have a 4 button's on form A that will open form B. Form B has date picker
and a few other options they can select. I don't want to have to create four
different forms (B), so I want to pass the report's name to form B.

Is there anything better then creating a hidden txt field on Form A then
doing a dlookup form form B to get this info?

Can you pass parm' via

docmd.openform
 
Hi Mark,

DoCmd.OpenForm has an OpenArgs argument, and anything you pass to that
is available as the OpenArgs property of the form you're opening.

Using a hidden textbox on the calling form is also a standard technique,
but normally you don't need to use DLookup to retrieve its contents.
From the other form, just use something like
Forms("Calling Form").Controls("txtXXX").Value
or
Forms![Calling Form]!txtXXX
 

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

Back
Top