I have just updated a database from Access 2000 to Access 2007 and have some difficulties with macros and some VBA code. Each time the macro or code is run Access crashes without an error. This only happens if a new recorded has been added and then printed. If the user goes back in a tries again it works!
What is very strange is that it all work ok in Access 2000. (Please don’t ask why its called email)
If I remove the where clause it works again
Can anyone help with this?
John
What is very strange is that it all work ok in Access 2000. (Please don’t ask why its called email)
Code:
Private Sub email_Click()
On Error GoTo email_Click_Err
DoCmd.OpenReport "Enquiry Form", acNormal, "", "[Enquiry Form Data]![EnquiryRefNo]=[Forms]![Enquirys]![EnquiryRefNo]"
email_Click_Exit:
Exit Sub
email_Click_Err:
MsgBox Error$
Resume email_Click_Exit
End Sub
If I remove the where clause it works again
Can anyone help with this?
John