variable question

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

How can I get the contents of a variable? I am using MS
Access 2002.

Dim Var1 as String
Dim Var2 as String

Var1 = mid(parm1,4,30) 'parm1= "....[forms]![frm1]![ctr1]

above code returns a string of "[forms]![frm1]![ctr1]" and
assigned to Var1. What I want is the contents of [forms]!
[frm1]![ctr]

Var1 = [forms]![frm1]![ctr1]

This code works and is returing the value of variable ctr1
to Var1.

Can anyone help? Thanks in advance.
 
above code returns a string of "[forms]![frm1]![ctr1]" and
assigned to Var1. What I want is the contents of [forms]!
[frm1]![ctr]
Var1 = Eval([forms]![frm1]![ctr1])
 
above code returns a string of "[forms]![frm1]![ctr1]" and
assigned to Var1. What I want is the contents of [forms]!
[frm1]![ctr]

Why mess around with strings: can't you simply pass the Control object
itself, and then use the .Value property?


Tim F
 
Back
Top