Set value of Text Box in Report

David Ball

Registered User.
Local time
Today, 18:54
Joined
Aug 9, 2010
Messages
230
Hi,

I have a report and want to set the value of a text box to a value from a query (Field "Week1Start" from Query "qryWeekDates") that is not part of the record source of the Report.

I have tried setting a On Load event:

Private Sub Report_Load()
[Text70].Value = qryWeekDates!Week1Start
End Sub

How can I change the code to get it working?

Thanks very much

Dave
 
You can't get the value that way. Try a DLookup().
 
I looked at DLookup but couldn't figure it out. Very confusing. What would the Criteria be?

Thanks
 
If the query only returns one record, you don't need one.
 
Thanks, I did find this out by playing around with it after I sent the last reply. But thanks for your help.

Dave
 

Users who are viewing this thread

Back
Top Bottom