Variable use before .Value

wallaseawez

New member
Local time
Today, 21:35
Joined
Aug 17, 2009
Messages
7
I am trying to substitue the 1 below for a Variable in my code

vol = Forms!frm_3rdSchd.att1.Value

but can't seem to figure out how to do it

vol = Forms!frm_3rdSchd.att & regNum & .Value

gives 'Invalid or unqualified reference'
 
Try this, which is off the top of my head:

vol = Forms!frm_3rdSchd.Controls("att" & regNum).Value
 
cheers pbaldy, this works a treat - knew it would be simple solution :)
 

Users who are viewing this thread

Back
Top Bottom