i know a lot of other people have asked about this, but none of those threads work for me.
i have a form that displays a company's list of employee info. what i want is a button on the form that will open a report based on all the records that are shown in the current form.
i've tried this code:
DoCmd.OpenReport stDocName, acPreview, , "firmnumber=" & firmNumber
but when i click on the report button, it asks me to input the firm number (which is already displayed on the form) and then it shows all the employees; it doesn't show the current form's employees.
if anyone understands anything that i'm talking about, please help. this has been bugging me for too long.
thank you in advance.
cate
i have a form that displays a company's list of employee info. what i want is a button on the form that will open a report based on all the records that are shown in the current form.
i've tried this code:
DoCmd.OpenReport stDocName, acPreview, , "firmnumber=" & firmNumber
but when i click on the report button, it asks me to input the firm number (which is already displayed on the form) and then it shows all the employees; it doesn't show the current form's employees.
if anyone understands anything that i'm talking about, please help. this has been bugging me for too long.
thank you in advance.
cate