Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dlookup not showing on Report

Status
Not open for further replies.

Trudye

Programmer
Sep 4, 2001
932
US
I have created a report that is based on User's request. I created a Popup form for the Users to enter their requests. The popup form is bound to a table(ReportParmSelection). The User can enter a date range and a status range. Or they can check the All status/All Dates check box. Their request is reflected in the table. I created a query that is based on the table. The query is bound to the report.

The problem I am having is, I want the requests to show up on the report. I tried Dlookup and nothing showed up. I added the table (ReportParmSelection) to the query and its request fields to the query grid. The request show up in the query but not on the report.

=Dlookup("FromStatus", "ReportParmSelection", "id= " & 1)

In the above Dlookup statement "id" is a field I added and placed a 1 in. There is only one record in the table. I do not delete and add recs, I merely edit the one rec and null the previous values. "FromStatus" is one the field options the User has.

I am out of ideas on how to solve this problem and I'm willing to entertain any suggestions.

Thanks much
Trudye
 
If there is only one record in the ReportParmSelection table then you can add it to the report's record source query and add the From Status to the query grid.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Thanks so much for suggestion I had not thought of making the requests a subform.

But I must be missing something or doing something wrong. I made the subform and when I open the subform the values are just what they should be. But when I open the main form only the labels show and not the parm/field values.

Trudye
 
I assume you mean subreport. Make sure you don't have any values set in the Link Master/Child properties.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
I'm sorry, yes I did mean subreport.

I selected None when asked for a link. This is too weird nothing I do seems to work. I know it's something stupid it always is in these cases. That's why you need a new pair of eyes (so to speak) to look at the problem.

Thanx so much
Duane


 
Can your subreport grow?

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
I changed "Can Grow" to 'yes' at the Detail level but it didn't work. I really didn't think that was the problem because the subreport is only printing a number between 1 and 9 after the label. The label is printing just fine there should be more than enough room to print one number.

I am truly stumped.

Trudye
 
What is the control source of the text box on the subreport? What is the record source of the subreport?

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top