If only I knew why.
Whenever I add the following bit of code to one of my form modules I get the message "This program has performed an illegal operation. MSACCESS caused an invalid page fault in module VBA232.dll at 018f:0fb3b4e0.
The code is to clear the form and subform
Dim MySQL As String
MySQL = "SELECT * FROM [Instructions] WHERE False"
Me![ClientSearchSubform].Form.RecordSource = MySQL
Me!ClientSearchBox = Null
Me!ClientSearchbox.SetFocus
It works fine until I close the form and then re-open it. Thats when the invalid page message comes up.
Also, I don't know whether its related, but if I also add a SetFocus to the on Open command for the form I then get a standard message along the lines of "the command is not a recognised event or procedure" when I open the form.
Can anyone help please
Keith
Whenever I add the following bit of code to one of my form modules I get the message "This program has performed an illegal operation. MSACCESS caused an invalid page fault in module VBA232.dll at 018f:0fb3b4e0.
The code is to clear the form and subform
Dim MySQL As String
MySQL = "SELECT * FROM [Instructions] WHERE False"
Me![ClientSearchSubform].Form.RecordSource = MySQL
Me!ClientSearchBox = Null
Me!ClientSearchbox.SetFocus
It works fine until I close the form and then re-open it. Thats when the invalid page message comes up.
Also, I don't know whether its related, but if I also add a SetFocus to the on Open command for the form I then get a standard message along the lines of "the command is not a recognised event or procedure" when I open the form.
Can anyone help please
Keith