How can I design a form to select information from a query

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

Guest

I want the form designed with drop down capability to look at a query; select
the person from the drop down box; then select only that individual; so I
then can print an individual report for that person only. I have already
designed the form, query and the report. I just can't get it to select that
individual persons record. Instead, it pulls up the whole database. Thanks
in advance for any assitance anyone can give me, to resolve this problem.
 
Hi,


The standard procedure is to use the WhereCondition argument of the
DoCmd.OpenReport to filter the report to only the records that satisfy the
criteria.


DoCmd.OpenReport "ReportName", WhereCondition:="ClientID=" & ClientID


if ClientID is numerical,

DoCmd.OpenReport "ReportName", WhereCondition:="ClientID='" & ClientID &
"'"


with the appropriate ' delimiter, if ClientID is a string.


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top