Mystery Query Error message when loading form

  • Thread starter Thread starter Greg
  • Start date Start date
G

Greg

When I try to load my form i get a warning message saying the
following
"Extra ) in query expression '(Contacts.ContactID = )'"
The problem is that this error message gives no information as to
where the query is located. I've already gone through all of my code
and commented out any and all queries using ContactID.

Furthermore, from what I can tell by using breaks this error message
appears before any of my code is even run. So that leads me to
believe it is a property of the form, like a wherecondition, but ive
gone through the property list and can't find any query there either!

This error doesn't effect how the form runs once it is loaded
(everything runs fine), it is just very annoying to have this error
message pop up each time i load the form.

Im truly stuck on how to get rid of this message, so if anyone has any
suggestions I would love to hear them.

- Greg
 
If the form is being opened from somewhere else, it could occur like this:
DoCmd.OpenForm "Form1",,, "Contacts.ContactID = " & Me.ContactID
because if the ContactID was null on the current form, it would result in
the malformed WhereCondition.

If that's not the issue, open the form in design view, and check its Filter
property.

If that still does not solve it, try selecting the form in the Database
window, copying (ctrl+C) and pasting (ctrl+G). See if the new form has the
same problem.
 
Back
Top