ecawilkinson
Registered User.
- Local time
- Today, 07:10
- Joined
- Jan 25, 2005
- Messages
- 112
Ken,
that was the general idea! You don't need the eval() in the code module in this case. I'm not sure exactly why you have to have it with recordsets that use queries that reference form controls. I have seen ana explanation but it escapes me now. It also has some other odd uses:
It allows you to use SQL operators that you cannot normally use in VBA, e.g.
intTest = Eval("Forms!frmtest!txtState IN ('CA', 'NY','WA')
if the textbox was one of the states then intTest would be -1 (true). The result of the expression evaluated by eval must be a string or an integer.
Chris
that was the general idea! You don't need the eval() in the code module in this case. I'm not sure exactly why you have to have it with recordsets that use queries that reference form controls. I have seen ana explanation but it escapes me now. It also has some other odd uses:
It allows you to use SQL operators that you cannot normally use in VBA, e.g.
intTest = Eval("Forms!frmtest!txtState IN ('CA', 'NY','WA')
if the textbox was one of the states then intTest would be -1 (true). The result of the expression evaluated by eval must be a string or an integer.
Chris