Reports from form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a employee database, I use the form to add data to this database, In
the form I have a combo box. I use this combo box to to revisit the data I
have entered. I also have a report for each employee in database (200
pages). I have a command button in my form called "preview report" when I
click this button it takes me to a report of all 200 employee starting from
page one. Actually I wanted this command button to take me only to that page
whose name appears in the form. Any help are highly appreciated

Some of the fields available in my database are: Name, Id number, address,
tel no, etc etc
 
Hello,

I have a employee database, I use the form to add data to this database, In
the form I have a combo box. I use this combo box to to revisit the data I
have entered. I also have a report for each employee in database (200
pages). I have a command button in my form called "preview report" when I
click this button it takes me to a report of all 200 employee starting from
page one. Actually I wanted this command button to take me only to that page
whose name appears in the form. Any help are highly appreciated

Some of the fields available in my database are: Name, Id number, address,
tel no, etc etc

Code the command button click event:
DoCmd.OpenReport "ReportName",acViewPreview, , "[IDNumber] = " &
Me![IDNumber]

The above assumes IDNumber is a Number datatype, and is the Prime Key
field for this table.
If it is text datatype then use:

"[IDNumber] = '" & Me![IDNumber] & "'"
 
Thanks, it was useful

fredg said:
Hello,

I have a employee database, I use the form to add data to this database, In
the form I have a combo box. I use this combo box to to revisit the data I
have entered. I also have a report for each employee in database (200
pages). I have a command button in my form called "preview report" when I
click this button it takes me to a report of all 200 employee starting from
page one. Actually I wanted this command button to take me only to that page
whose name appears in the form. Any help are highly appreciated

Some of the fields available in my database are: Name, Id number, address,
tel no, etc etc

Code the command button click event:
DoCmd.OpenReport "ReportName",acViewPreview, , "[IDNumber] = " &
Me![IDNumber]

The above assumes IDNumber is a Number datatype, and is the Prime Key
field for this table.
If it is text datatype then use:

"[IDNumber] = '" & Me![IDNumber] & "'"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

access report 0
Access Access Report Works on One Machine but not Another 3
Filtering Report Data 3
Access How Current page of a form Read Only 2
Using a form to open a report 7
Filter Report 8
Combo Box on Parameter Form 4
Report and crosstab 5

Back
Top