Trail Log

  • Thread starter Thread starter Joy
  • Start date Start date
To track down what's wrong, temporarly disable the error handers at the top
of each procedure, by adding the single quote to this line:
'On Error Goto...

Now when something goes wrong, the code should pause, showing the line that
caused the problem. The most common problem reported with this technique is
where your table structure does not match exactly, e.g. the fields are in
the wrong order, or wrongly named, or a field is missing. The action query
strings then fail to execute. By removing the error handler, you can see
which string fails to execute, and fix the table that is wrong.
 
Hi Allen:

I checked the code and commented out the line as you suggested and I
got the following errors. Error 3075 Missing operator in query
expression assign.request # = 6612. DB fail on error 128.. I have
checked my tables and everything seems to be okay. The number 6612 is
the last number in the database. I am not sure what to do from here.
I await your assistance.

Thank you,
 
Hi

Upon further investigation, I found out that the error is coming up
with a variable that I do not have in my database. How do I resolved
that?

Thank you
 
Joy, you will need to have some understanding of VBA and SQL to implement
this solution.

The SQL must be correct (without any missing operators), and the VBA must be
correct. I have no idea which variable you are missing, or what you are
using that variable for. It might be the bWasNewRecord that needs to be
declared at the top of the form's module, but it actually could be anything.
 
Hi Allen:

Here is the section of code in my database that I am having the error
on.

Option Compare Database

Dim bWasNewRecord As Boolean


Private Sub Form_AfterDelConfirm(Status As Integer)
Call AuditDelEnd("audTmpSubmitAssign", "audSubmitAssign", Status)
End Sub

Private Sub Form_AfterUpdate()
Call AuditEditEnd("SUBMIT ASSIGN", "audTmpSubmitAssign",
"audSubmitAssign", "REQUEST #", Nz(Me![REQUEST #], 0), bWasNewRecord)
End Sub

Private Sub Form_BeforeUpdate(Cancel As Integer)
bWasNewRecord = Me.NewRecord
Call AuditEditBegin("SUBMIT ASSIGN", "audTmpSubmitAssign", "REQUEST
#", Nz(Me.[REQUEST #], 0), bWasNewRecord)
End Sub

Private Sub Form_Delete(Cancel As Integer)
Call AuditDelBegin("SUBMIT ASSIGN", "audTmpSubmitAssign", "REQUEST #",
Nz(Me.[REQUEST #], 0))
End Sub

Error 3075 missing operator in query expression'(SUBMIT ASSIGN.REQUEST
# = 301)'

Thanks for any assistance.
 
If your field name includes a space or non-alphanumeric charcter (such as
#), you must enclose the name in square brackets, e.g.:

Call AuditDelBegin("SUBMIT ASSIGN", "audTmpSubmitAssign", "[REQUEST #]",
Nz(Me.[REQUEST #], 0))
 
I implemented the change you requested and I am still getting the same
error. After the Me. and that drop down box comes up, the variable
that I used REQUEST # is not showing up in the drop down box. What is
your suggestion. I am jjust learning VBA.

Thanks.
 
Joy, you will need some understanding of VBA and SQL to get this to work for
you.

It is a matter of taking it a piece at a time, finding out where each error
is, and persisting until all errors are fixed. Be patient with yourself if
you are just learning. It's worth the effort in the long haul.
 
Back
Top