Problem with the use of aplyed filter from form on report

G

Guest

I want the report to show the same reccords witch are on form on witch I
aplyed filter (ex.: I filtered records so that it shows data of worker Mike
only).

Report works fine if i want it to show all records!
If i want rpt to show records i see on form i get error with inputbox:
Input parameter value
Lookup_WO__Worker.W_Name

Im in desperate need of help!
Thanks for your time!

----
code behind cmd button witch opens rpt:
Private Sub cmdRptWO_Click()
On Error GoTo Err_cmdRptWO_Click
Dim strFilter As String
Dim strDocName As String
strFilter = Me.Filter
strDocName = "rptWO"
DoCmd.OpenReport strDocName, acViewPreview, , strFilter
Err_cmdRptWO_Click:
MsgBox Err.Description
Resume Exit_cmdRptWO_Click
End Sub

----
Base has 6 tables:
- tblRepairWorker[RepairWorker_ID, RW_Name]
- tblWorkOrders [WorkOrder_ID. WO_Date, WO_Hours, WO_Worker, WO_Field,
WO_Activity, WO_Product]
- tblField [Field_ID, F_Name]
- tblActivity [Activity_ID, A_Name]
- tblProduct [...]
- tblProject [...]

Reccord source on form is SQL select (fields from tblWorkOrder, tblProduct &
tblProject); RS on report is qry (fields from tblWorkOrder, tblActivity).
 
D

Douglas J. Steele

Are you saying that the query on which the report is based is using a field
on the form as a parameter?

Exactly how are you referring to the field in your query? It needs to be
Forms!NameOfForm!NameOfControl. The keyword Forms must be there. Make sure
you haven't mistyped either the name of the form or of the control.
 

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