D
David Cowdrey via AdminLife
(Type your message here)
Could someone please help!!
I am trying to print the current record on a form.
i have used the following code in the private sub for a preview report button in one instance:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenReport "NCR_Rpt", acViewPreview, , "[Serial Number]=" & Me.Serial_Number
and it works fine automatically.
I have tried to do exactly the same thing only changing the report name and corresponding fields on a different form
eg:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenReport "ECN_Rpt", acViewPreview, , "[ECN_ID]=" & Me.ECN_ID
when i click on the button it asks me for the ECN_ID and even if i just click ok it does what i want but
Does anyone know how to stop the prompt box from popping up or has anyone got a better code example?
Could someone please help!!
I am trying to print the current record on a form.
i have used the following code in the private sub for a preview report button in one instance:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenReport "NCR_Rpt", acViewPreview, , "[Serial Number]=" & Me.Serial_Number
and it works fine automatically.
I have tried to do exactly the same thing only changing the report name and corresponding fields on a different form
eg:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenReport "ECN_Rpt", acViewPreview, , "[ECN_ID]=" & Me.ECN_ID
when i click on the button it asks me for the ECN_ID and even if i just click ok it does what i want but
Does anyone know how to stop the prompt box from popping up or has anyone got a better code example?