Return search criteria in report

Hayley Baxter

Registered User.
Local time
Today, 05:04
Joined
Dec 11, 2001
Messages
1,607
Hello Everyone

I would like to return what the user(s) select on a search form in the report. I can get this to work by using = [Fieldname] BUT the combo box on the search form is hiding the bound column and looking up column 2 so how do I therefore get the report to also return column 2 and the not the ID no which I am currently getting in the report.

Any advice?

Thanks
Hay
 
have u tried using DLOOKUP for the report field?
 
I have tried this now but it's not working. I've never used dlookup before here goes........

It's asking for a parameter with what I've tried


=DLookUp("[CategoryName]","tblProspects","[CategoryID]=" & [CategoryName])

I have a search form which is a query by form so what I want is for the Category name chosen in the categoryID combo on my search form to display Category Name 1 or 2 etc of whatever is selected.

Can anybody help?
Thanks
 
=DLookup("[CategoryName]", "tblProspects", "[CategoryID] =" & Reports![your report name]!CategoryID)
 
for the criteria in the query for catagory name enter this
[Forms]![form name]![CategoryName]

then in the after update event use
DoCmd.OpenReport "report name", acPreview
to open the report
 
Who's clever then?? Thank you so much. This has been one of those days where nothing has went right I'm glad it's Friday.

Have a great weekend
Hay
 

Users who are viewing this thread

Back
Top Bottom