DLookup and form events

  • Thread starter Thread starter Junior
  • Start date Start date
J

Junior

Need advice -please excuse if my terms are incorrect
I'm setting a global (public) variable using a cbo box on Form1 after update
using this code

Me.Requery
IntAdd = DLookup("PAdd", "tblProfSusp")

and also in the Main form Onopen event
IntAdd = DLookup("PAdd", "tblProfSusp")

the Main form is always open - sometimes hidden
do i need to put code elsewhere?
or is there a better solution -
IntAdd is used in several functions
 
Junior,

I guess you need to put code to refresh the value of the variable in any
case where the value of PAdd in the table can be changed. If Form1 is
the only place where this can happen, I guess you've got it covered.
 
Thaks Steve - i get confused with events-
didn'tt know if on current needed the code?
 
Back
Top