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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't find field problem

Status
Not open for further replies.

GarstonMassive

Programmer
May 5, 2006
71
GB
Hi I've got a report bound to a table and a textbox bound to one of the fields in the report header. There is data in the field.

If I run the report the data is displayed in the header as expected. However if I put some test code eg.

MsgBox Me.DateRegistered

in the Report_Header Format event it tells me that it "...cant find the field..." even though the bound textbox is still there!

I need to be able to manipulate the data in the table in code first of all before I display it (dates in wrong format incidentally).

Anyone help???
 
Try Me!DateRegistered instead.


Also you can use the format function to change the format of your date (assuming the datatype is date/time and not text). Just set the control source to something like...

=Format(DateRegistered,"mmm/dd/yyyy")

Check out the format function for other options.

 
I did try that mate but it didnt work.

I got round it by doing a DLookup instead but it's dead annoying these silly inconsistencies....

Cheers anyway.

 
Is DateRegistered in the query you have your report based on? If not, that would be the problem.
 
Yes it is. And when I push dot in the code window the field even appears in the drop-down list and allows me to select it.

I read somewhere else this is due to there being no data in the field but there is! Very confusing but this is 97 (dont ask) we're dealing with.
 
Works for me in Access 97 SR2.
Except I used Cust_id as my field. Both the dot (.) and the bang (!) work. Only thing I didn't do was actually put a control in the report header.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top