In the Objects dialog box click on Modules. If there is already a module
present click on it to open. If there are no modules, create one. Near the
top , just under "Option Compare Database" you need to declare a global
variable, depending on the data type of the value you want to re-use. For a
string value it would be something like
Public strCurrentClient As String
Close and save the module, naming it if necessary.
Now, from anywhere within your database, you can assign a value to this
variable i.e.
strCurrentClient = txtClientName
After this is done, from anywhere else in your database, you can use
strCurrentClient and the value you assigned it will be plugged in. This
variable will retain the value until you 1) Re-assign another value to
strCurrentClient or 2) You close the database.
--
There's ALWAYS more than one way to skin a cat!
Answers/posts based on Access 2000
Message posted via AccessMonster.com