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
fredg - 31 Oct 2004 19:12 GMT
> Hello,
>
[quoted text clipped - 8 lines]
> 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] & "'"

Signature
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
senkurion - 31 Oct 2004 20:23 GMT
Thanks, it was useful
> > Hello,
> >
[quoted text clipped - 18 lines]
>
> "[IDNumber] = '" & Me![IDNumber] & "'"