View Full Version : Report a queried form.


dluong
06-30-2003, 12:44 PM
Here is what I have so far :

1) Search Form (get input from the user)
2) Result Form (the results from queried the Search Form)

Here is what I want:
1) A command button that will report the record that I have queried in the Result Form.

Thank you.

jfgambit
06-30-2003, 01:05 PM
Assuming you have a specific ID on the Result Form for each record (in this case I will call it IDNbr) you can use the following:

Docmd.OpenReport "Name",acViewPreview,,"[IDNbr] = " & Me.IDNbr

HTH

dluong
06-30-2003, 03:15 PM
I didn't used ID for primary key, but instead I used LName and FName for primary key.

I only queried one table for my form.


I've tried this

Originally posted by jfgambit
Docmd.OpenReport "Name",acViewPreview,,"[IDNbr] = " & Me.IDNbr

HTH

with Last_Name and it only return one record on my report.

dluong
07-01-2003, 09:05 AM
Help? anyone? Please

dluong
07-01-2003, 11:19 AM
Private Sub rprtAdmResult_Click()
On Error GoTo Err_rprtAdmResult_Click

DoCmd.OpenReport "Deposition", acViewPreview, , "DepID = " & Me.DepID

Exit_rprtAdmResult_Click:
Exit Sub

Err_rprtAdmResult_Click:
MsgBox Err.Description
Resume Exit_rprtAdmResult_Click

End Sub


This is what I have for my code, I ran it and it only return 1 record in my report.

I want it to return all the records in the query result form. Thank you guy.