I have a button on my form that creates a print preview of my report. I can not get it to open on the same record as the current form. Instead it opens to the first record. They are both on the same query. I tried both macros and VBA. I'm new to access and cant understand how to get my records to be the same and print preview just the record I had open in my form
Here's my VBA code,I get error saying "no messsage for this error"
DoCmd.OpenReport "Moisture", acViewPreview, , "[Order Number]= " & [Order Number]
"[Order Number] = '" & [Order Number] & "'"
. However, might need to first run code that commits record edits to table. Also, recommend no spaces nor punctuation/special characters (underscore only exception) in naming convention. – June7