variable declarations

  • Thread starter Thread starter joten
  • Start date Start date
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.
 
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
 
Back
Top