Skip to content
Advertisement

Run-Time Error ’13’ Type Mismatch – ACCESS DATABASE

I am trying to compare two text fields txtTrailerNumber and txtSealNumber to the database table Tab_TrailerDetails. [TrailerNumber] and [SealNumber] as listed in the table.

I am trying to get the database to look at the trailer number entered into the form, and if it finds a duplicate value it then looks at the seal number entered into the form. If both values have a duplicate found in the table it should throw up the Msg_Box error code.

Advertisement

Answer

The cause of the error is that you have a logical keyword, notably AND inside a string expression. Change your code to

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement