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

Query an unbound textbox

Status
Not open for further replies.

tjs32

Programmer
Jun 21, 2004
26
AU
I thought that this would be quite simple but I must be missing something.

I have an unbound form with an unbound textbox, I have set the default value of the textbox to =Date()

When I then query a table (I am later using this query in an append query) setting one of the fieldnames as Forms!frmSelect!Text2 it comes up blank.

If the date is manually changed in the form it comes up in the query.

Somehow the query is not picking up the data in the unbound textbox if the data is set for that textbox using the default value, onload or onopen events (I have tried all of them). The only time it works is if it is manually entered into the field.

hope this is clear enough. Any pointers would be appreciated.

Thanks
 
You may try this in the query:
Nz([Forms]![frmSelect]![Text2], Date())

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Not sure why that made a difference but it did the trick. Thank you so much and for your prompt reply.

Regards TS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top