Form filter

V

vaa571

Need help with filter
My database has a table called “Main†with 3 fields “Lot Number†“Pack
Serial Number†and “Board Serial Numberâ€. At the end of each batch I need to
filter records for a report to be sent with the packs to our customer. How
can I set this using a form where the person at final inspection can be
prompted to enter the pack serial number that has passed inspection? i.e ,
lets say I have pack serial number “123456†on my hands for inspection and I
need to filter that pack for my report?

Thanks
 
T

Tom van Stiphout

On Tue, 30 Sep 2008 11:15:01 -0700, vaa571

Study DoCmd.OpenReport in the help file, and you will see it has a
WhereClause argument. Set it to "[Pack Serial Number]=123456" and the
report will apply that restriction.
How do you get that whereclause in place? You could create a Print
form with a dropdown of available PSNs. THen the whereclause would
become:
"[Pack Serial Number]=" & Forms!MyForm!MyDropdown

-Tom.
Microsoft Access MVP
 
V

vaa571

Tom, This report will have multiple records, over 1000 packs is shipped per
lot. My intention is to select/filter the records as I am doing inspection so
at the end all I have to do is print out the report. I would like a form to
select the record - operator open the form at the beggining of the inspection
and scan the "Pack Serial Number" than it is automatic filtered from the
"Main" table where the record is originally stored and populate/outupt to a
report for that particular lot. let says if 16 months from now i need to go
back to this database and find out the information ref any lot number, this
report is already there or I can run it again. I know this can be
accomplished, I am just getting lost how to do that as simple as possible.


Thanks for you help

Tom van Stiphout said:
On Tue, 30 Sep 2008 11:15:01 -0700, vaa571

Study DoCmd.OpenReport in the help file, and you will see it has a
WhereClause argument. Set it to "[Pack Serial Number]=123456" and the
report will apply that restriction.
How do you get that whereclause in place? You could create a Print
form with a dropdown of available PSNs. THen the whereclause would
become:
"[Pack Serial Number]=" & Forms!MyForm!MyDropdown

-Tom.
Microsoft Access MVP


Need help with filter
My database has a table called “Main†with 3 fields “Lot Number†“Pack
Serial Number†and “Board Serial Numberâ€. At the end of each batch I need to
filter records for a report to be sent with the packs to our customer. How
can I set this using a form where the person at final inspection can be
prompted to enter the pack serial number that has passed inspection? i.e ,
lets say I have pack serial number “123456†on my hands for inspection and I
need to filter that pack for my report?

Thanks
 

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

Top