13 Type Mismatch error

XV1957

Registered User.
Local time
Today, 07:20
Joined
Aug 6, 2014
Messages
80
Can anyone help me?
I use Susan Harkin’s Simple solution for tracking changes to Access data.
When I call the routine from my Company form it works (a record is created correctly on a change)
When I call the routine from my Article form it does not, it gives a Type mismatch error 13
Yet:
1. I copied the code from the Company form to the Article form, so it is rigorously identical
Private Sub Form_BeforeUpdate(Cancel As Integer)
Call StampRecord(Me, False)
Call AuditTrail(Me, ID) ---> this is the line causing me grief
End Sub
2. When I add MsgBox Me.Name & “ “ & Me!ID before the line in question it correctly gives me both.
3. ID is the autonumber key to the record bound to the article form
So, why does Access give me a type mismatch error in the case of my Article form and not in the case of my Company form? If this forum would not exist, I would be pulling my hair out.
 
Hi Uncle Gizmo,
thank you for replying on a we.
Yes I did have a text box ID. When I changed it to txtID and used this in calling the function, it worked.
As they say in New York, you are a gentleman and a scholar. Thanks again for your precious help.
 

Users who are viewing this thread

Back
Top Bottom