single report

Nick Druce

Registered User.
Local time
Today, 21:39
Joined
Mar 2, 2005
Messages
18
When i have a form in access with all the details filled in, how do i print that as a report And NOT have All the fields in the table be printed on the report as well?
 
Last edited:
u mean u want to create a report from a table that has NOT all the fields of the table but few of them.
than create a report using report wizard and it will ask u which fields u want in report.
 
I have all the fields i need but i only want to print a report for one customer but when i try to print the report displays evrything in the table. I need a way of asking the user to select a customer and then it will print the reoprt for that customer only.
 
create a form for asking a customer, i.e. with a combo box having rowsource of cust_id or what ever u want. then create a command button. In wizard select record operation and select the report u want to run in preview.


then open the code of the command button
it shows:
DoCmd.OpenReport "ur report name", acViewPreview

add the where condition for ur cust_id in this code as:
DoCmd.OpenReport "ur report name", acViewPreview, , "cust_id = "& forms![ur form name]![ur cust_id field name on the form]

if the cust_id is of text datatype than add single quotes i.e. " ' " before and after the forms![ur form name]![ur cust_id field name on the form].
 
Single Report

Thanks For that. However I would like to be able to not have to prompt the user to input the data Once the from is filled in . They just Click the button and the information that is currently on the form is printed to the report. Any Ideas would be very helpfull.
 
Use your OWN form and field names, not the ones in the example.
 
Single report

I have used my own field names but using [] is a prompt for the user to input somthing. That is what I am tryng to bypass
 
If you are being prompted, it is because there is some typo or the form you are referencing is closed. Access can't find the field you are referencing. That is why it is asking for a value. Are you perhaps trying to reference a field in a subform? That would be
Forms!mainformname!subformname.Form!controlname
 

Users who are viewing this thread

Back
Top Bottom