Dumferling
Member
- Local time
- Today, 21:30
- Joined
- Apr 28, 2020
- Messages
- 102
I am getting a data type mismatch in a Find First. The line of code is:
rst.FindFirst ("[FSPNumber]=" & vblFSPA)
I have checked that the field (FSPNumber) is a text field and the variable vblFSPA is declared as a string and the data it stores is from a text field. I am sure I am doing something really basic wrong here. I can get the code to work if I fill the string manually (vblFSPA = "3030") but the moment I fill it with information taken from a Recordset, it throws up a Data type mismatch. Everything else works, just this one line is killing me.
Any suggestions on what I am doing wrong?
rst.FindFirst ("[FSPNumber]=" & vblFSPA)
I have checked that the field (FSPNumber) is a text field and the variable vblFSPA is declared as a string and the data it stores is from a text field. I am sure I am doing something really basic wrong here. I can get the code to work if I fill the string manually (vblFSPA = "3030") but the moment I fill it with information taken from a Recordset, it throws up a Data type mismatch. Everything else works, just this one line is killing me.
Any suggestions on what I am doing wrong?