variable declarations

J

joten

Hello. I suppose that it will be by my ignorance of Visual BASIC, but I
have a problem that I don't know how to solve.
I have been reading the VBA help but I don't understand very well the
modules, projects,etc.
The problem is that when my database starts, I want to select from a
combobox the customername field in order to all the operations that are
executed after this (queries, adds, maintenances, etc.) they are
referred to the selected customer, whose name should appear in every
form of the database.
The question is: Where and how have I to declare the customername
variable in order to the mentioned customer's name are identified all
around the database?
Thank you in advance and sorry for my bad english.
 
N

Nikos Yannacopoulos

Type the following declaration:

Public strCustName as String

in the declarations section (top, after standard
line "Option compare database", before the first sub or
function) of any standard module.
This will make variable strCustName available throughout.

HTH,
Nikos
 

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