Variable not definied problem.

SpiritedAway

Registered User.
Local time
Today, 08:33
Joined
Sep 17, 2009
Messages
97
Hi All

I've got this bit of code behind a button:

If Me.ProgressFlow = "No" And Me.Status = "Draft" Then
StrA = [Protocol2]
DoCmd.GoToRecord , , acNewRec
Me.Protocol2.Value = StrA
Me.Status = "Pre-Approved"
End If

I tested it out in a demo db where it worked just fine before I copied over to my main db but get an "Variable not definied" error message on the StrA = [Protocol2]


It works in the demo but not in the actual one - spelling of controls exist and are correct -

Can anyone advise where I'm going wrong?

Using Access2007

Thanks
 
Solved it - realised I had Open Explicit in the general declaration of the forms module - deleted it and it works!
 

Users who are viewing this thread

Back
Top Bottom