Reputation:
Could someone please help me with the IF-syntax below?
This is what we need to do:
Form1
; Form1
to open Form2
; Form2
opens, it contains info from Form1
. So, I add this to Properties/OnDirty/CodeBuilder
:
If me.Dirty = True then
Me.Dirty = false
Docmd.OpenForm "Form2",,,"EvalID = " & me!Eval_ID
As soon as I enter data, the Docmd
line creates a
run-time error 3075, syntax error (missing operator)...EvalID
In Form1
the key is Eval_ID
and in Form2
I have EvalID
(but not not the key).
Any suggestions?
Upvotes: 0
Views: 3666
Reputation: 21
It looks to me like there are a few things going on here. It would also help to confirm some information:
This isn't likely the issue causing the syntax error. It should be simple enough to resolve that. Put a breakpoint in the code at that location. At that point, copy the resulting string (e.g. EvalID = 7) after the word "WHERE" in the SQL view of a new query based on the two tables. Preview the query to debug the cause of the problem with that expression.
Upvotes: 1