Data error

P

Peter

I keep getting a data error on a form in an Access 2000
database. I have wracked my brain to think of a cause
and failed. I can trap it in the Form_Error event and it
does not seem to cause any problems, except that an
irritating message appears on the screen saying: "The
expression you entered contains invalid syntax. You may
have entered a comma without a preceding value or
identifyer". I have no SQL in the form's module, or
elsewhere as far as I can see, that could lead to such an
error.

I have two questions. First, does anybody know of a
common cause for such errors? Secondly, if I cannot cure
it, can I suppress the irritating message?
 
W

Wayne Morgan

Have you stepped through the code to see which line is generating the error?
If so, can you post the relevant code with the line marked?
 
P

Peter

I have stepped right through and it does not come up
anywhere in my code. The error always occurs when I move
to another record and seems to be generated outside any
code I have written.
 
W

Wayne Morgan

In that case, have you tried using the query feeding the form instead of the
form to see if you also get the error?
 
G

Guest

The query feeding the form works fine. I get the
impression, and it is only an impression, that the
problem is more to do with incompatibility between
changes made to controls on the form, that is things
typed into text boxes, and other changes made to the
underlying tables by means of action queries triggered by
code in the form's module. I try always to refresh the
form before triggering any such action queries and
requery it afterwards, but that does not always seem to
work properly.
 
W

Wayne Morgan

In your original post, you said that you have no SQL in the form's module.
However, you now say that you are running action queries from the form's
module. The SQL may not be in the module, but it is still being run from
there. Have you tried manually running the action queries to see if they are
working properly?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Data error 2
Error 3314 2
Form_beforeUpdate question 5
Query text within a table 2
Cancel from OnError Event 4
invalid vertical bar 2
Access Access database invalid syntax error message 0
Reserved Error #16389, Access 2003 SP3 3

Top