Hi,
I have got a run-time error here. It said as follows
"Execution of this application has stopped due to a run-time error. The application can't continue and will be shut down." That's all there is for the error message.
I'm not sure if it's to do with runcommand thing that i put into the form.
This form has a number of comboboxes that are used for filtering fields for example
Table customer(custID, CustFName, CustLName, ...)
cb1 filters custID, cb2 for CustFName and so on. So that when a user comes along, he can type in "2*" in the cb1 and it lists out all the record starting from 2 on the list_box. The codes here are very simple, no runcommand or stuff like that.
Then, on the bottom of the form, there is a button that does printing. With this, he can select one of the records displayed on the list_box and prints only that record out. The codes that i put in the button print is as follows
DoCmd.SelectObject acReport, stDocName
DoCmd.RunCommand acCmdPrint
If Err.Number <> 0 And Err.Number <> 2501 Then
MsgBox Err.Number & ":" & Err.Description, vbCritical
Else
Err.Clear
End If
how do i get around this problem?
Thank you in advance
I have got a run-time error here. It said as follows
"Execution of this application has stopped due to a run-time error. The application can't continue and will be shut down." That's all there is for the error message.
I'm not sure if it's to do with runcommand thing that i put into the form.
This form has a number of comboboxes that are used for filtering fields for example
Table customer(custID, CustFName, CustLName, ...)
cb1 filters custID, cb2 for CustFName and so on. So that when a user comes along, he can type in "2*" in the cb1 and it lists out all the record starting from 2 on the list_box. The codes here are very simple, no runcommand or stuff like that.
Then, on the bottom of the form, there is a button that does printing. With this, he can select one of the records displayed on the list_box and prints only that record out. The codes that i put in the button print is as follows
DoCmd.SelectObject acReport, stDocName
DoCmd.RunCommand acCmdPrint
If Err.Number <> 0 And Err.Number <> 2501 Then
MsgBox Err.Number & ":" & Err.Description, vbCritical
Else
Err.Clear
End If
how do i get around this problem?
Thank you in advance