using public variables

  • Thread starter Thread starter Karen
  • Start date Start date
K

Karen

I'm working on something similar to Dennis but I'm clueless on how to use a
public variable at all.

I want to create a button a form (the form displays records based on a
query) that will allow the user to select a record from the form and when
the button is clicked a new form opens and displays the full record based on
the key field.

The first form is like this

code,description
code2,description2
code3,description3

When the user clicks on code3 and then clicks this button I want a form to
open and display the full record of code3. How do I pass the code3 from one
form to the other?

Can someone help me?
 
Use the OpenArgs option in your Open Form method and pass the vaule there.
You will also have to put some code in the On Open Event of the form you are
opening to handle the passed value. Another way, if the first form will
always be open while the called form is active is to reference it from the
Opened Form.

x= [forms]![frmForm1]![mtControl]
 
Back
Top