Date on Form

Taxcop

Registered User.
Local time
Today, 01:51
Joined
Aug 16, 2001
Messages
12
I have a form which is based on a query. The quary yields stats based on a specific date which is entered with [Enter Date]. I would like to have the specific date be in the form. I have tried making a new unbound text box and using ="Flyer Date: "&[Enter Date] in the data control box but I keep getting "name?" in the text box when I open the form. Any ideas on why or how to do this?
Thanks for any help.
 
You want the date that was selected for opening the query to show on your form?
My example states that the date chosen was the criteria for the field FlyerDate from your table.

Try this:

unbound text box: ="Flyer Date:" & " " [FlyerDate]

Seems just like a syntax thing. The [Enter Date] you used is NOT the name of the field you need to show.
 
I think that Taxcop is trying to capture the entry that the user typed into the Parameter Input Box from the query. In this particular case the info from the field would work. But what if the if he had a Range for the Criteria??
In a Report you can access the Input Parameters as you would any other field. So what he has would work.

In a report you could use this:
="Flyer Date: " & [Enter Date]
Placing the above as the control source of a textbox will return the desired results.

But to do this in a form, you do the work in the query instead by adding a field Expression:

Try adding the following as an Expression in the query:

UserInput: "Flyer Date: " & Format([Enter Date],"mm/dd/yyyy")
(I formatted the date in the above expression)

Make sure that the reference to the Parameter Input is exactly the same.

Now you can go to the form and use the newly created Expression as you would any other field from the record source query. Simply set the Control Source for a txtbox to this newly added field expression.

HTH
RDH

[This message has been edited by R. Hicks (edited 08-26-2001).]
 

Users who are viewing this thread

Back
Top Bottom