textbox default value

honnour

Registered User.
Local time
Tomorrow, 01:43
Joined
Mar 1, 2012
Messages
43
Hi,

I have a text box and I want to set its default value from query.
My query is selecting only max of date from a table. Query is working fine.
When I select query from expression builder and relevant field from that query text box shows "#Name?"

How can I fix this?

Thank you
 
Have you set the properties of the text box to the same as the field within your table? Textbox to Format as Date
 
yes, it is in general date format
 
Can you upload a sample of the database so it can be checked for you. Attachments can only be up to 2mg.
 
I cant because I'm at work and its crypted.
But what do you think cause the problem?
 
Ok do you have groupings on in your query so you are using the MAX in a group? If so then the Query will name the field MaxOfSomething, so you might need to adjust the name to something:MaxOfSomething (I don't know the field name you are using so adjust the word Something).
 
Try this, open the form in design view then change the Control Source for the textbox to use a DMAX formula. I have simulated this:

=DMax("[iDate]","tTransactions","[iAppealID] = 15")
 

Users who are viewing this thread

Back
Top Bottom