Passing variables between forms

AlexB

Registered User.
Local time
Today, 22:08
Joined
Mar 3, 2003
Messages
21
I need to be able to pass a variable (or several) from one form to another - is it possible to do this?

I want to be able for someone to enter data into a form, and transfer an ID number when they click a button to open the next form.

I could bodge it and store it in a table at the end of one form in a button, and then retrieve it from the next form when it loads, but it seems a bit shoddy and not really what I want. I was taught it at uni a couple of years ago but I can't really remember anymore...

Cheers
 
If the ID is to open a form filtered to a key in another you can use the filter property of the form you are going to open.

Or, you can declare Public variables in a module which store the value throughout the database.
 
Sorry, your first suggestion has just gone over my head.

The 2nd one I could use... how do I declare public variables?
 
In a module:

Public strUser As String

Public booFlag As Boolean

Public intID As Integer


etc, etc.
 
Ok, thanks again!

PS - do you get paid for this? ;)
 

Users who are viewing this thread

Back
Top Bottom