[AccessD] (no subject)

Arthur Fuller fuller.artful at gmail.com
Mon Feb 25 11:57:46 CST 2008


My suggestion would be to skip the LIKE query and instead pop up a form
first, containing a combo box and two buttons (preview and cancel). Let's
call the combo-box Finder_cbo. First create a query called Patients_qs whose
SQL is:

SELECT PatientID, Lname & ", " & Fname & " " & Mname
FROM Patients
ORDER BY Lname, Fname, Mname

Save this query as Patients_qs (suffix means query select).

Create a form containing a combo box and a pair of buttons "Preview" and
"Cancel". use the wizard to create the buttons and for the former button,
choose Preview Report. Change the resulting code so its stCriteria string
looks like:

stCriteria = "PatientID = " & Me.Finder_cbo

Use the wizard to create the Cancel button and for its action just choose
Form | Close.

Finally, instead of opening the report directly, open the form just created
and it will handle the rest.

hth,
Arthur

On Mon, Feb 25, 2008 at 12:34 PM, <krosenstiel at comcast.net> wrote:

> >From a patient database in Access 2003, I want to pick the right patient
> for a report of individual details. I have fields Lname, Fname and Mname. In
> the query on the Lname field I have the following as the criteria:
>
> Like "*" & [Enter Last Name] & "*"
>
> This works fine to pick all the Johnsons, including "Johnson, Jr."
> However, the report is then returning all the Johnsons in sequence, but I
> only want 1 particular Johnson with his/her individual details. How do I get
> the query to give me a list of "Johnsons," including first and middle names,
> from which I can pick the right patient to plop into the report?
>
> MTIA -- and please keep it simple, I'm not very advanced with Access
>
>
> --
> Karen Rosenstiel
> Seattle WA USA
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>



More information about the AccessD mailing list