hello, I have a form with behind it a dataset (a linked table from another ACCESS DB).
On the form I have a button with an input box for a search function,
which show the searched record (based on a value CTR_ID from the table.
however this button crashes (90% of the time).
I have found where it crashes, it's on the findfirst part, here are some code snippits:
an example of the value of strcriteria = [CTR_ID] = '000094591261'
it does not always crash, weirdly enough, but when it does I get the message 'access has stopped working.
For the future, I plan to change the search function, put it outside the form, and only open the form with a recordset with only concerned record (select * where [CTR_ID] = '000094591261') , but I really would like a solution for this, I can't seem to find the cause
On the form I have a button with an input box for a search function,
which show the searched record (based on a value CTR_ID from the table.
however this button crashes (90% of the time).
I have found where it crashes, it's on the findfirst part, here are some code snippits:
Code:
Dim rst As DAO.Recordset
Dim strCriteria, seek_Ctr As string
Set rst = Me.Recordset
strCriteria = "[CTR_ID] = '" & seek_ctr & "'"
rst.FindFirst (strCriteria)
an example of the value of strcriteria = [CTR_ID] = '000094591261'
it does not always crash, weirdly enough, but when it does I get the message 'access has stopped working.
For the future, I plan to change the search function, put it outside the form, and only open the form with a recordset with only concerned record (select * where [CTR_ID] = '000094591261') , but I really would like a solution for this, I can't seem to find the cause
