Update query to change date

chef_tim

Registered User.
Local time
Today, 14:26
Joined
Dec 16, 2004
Messages
77
G'day, I'm trying to replace a date on a table using an update query. I have the criteria set to [enter date] but it won't put it in the update to block. I know this has to be one of those easy one but after a search and using help I can't nail it down. Much appriciated, Tim

Guess I should add that I'm going to use a command button on a form to run the query and I want it to prompt me for the date.
 
Use a text box on the form to capture the user input, instead of the prompt. Reference the text box with this syntax
Forms!frmMyForm!txtMyTextBox
 
Thanks Neil, but could you give me a few more details? I didn't understand a thing you wrote....LOL. I'm not the brightest star in the sky with this stuff:D . Thanks again, Tim
 
Not sure what you are trying to do here Tim, do you want to change all of the dates in the table to the same new date? If so you do not need a criteria.
If you want to replace a specific date with a new date put [Enter New Date] in the Update to row and [Enter Old Date] in the criteria row and the user will be prompted for both.

Brian

PS I would use text boxes on your form with the command button as suggested by Neil, the user enters the data and hits the button.
 
I think I may have gone about this a bit back wards, but what I did was put [date trained dd-mmm-yy] in the "update to" box on my quiery. When I click on my run update quiery command button it prompts me for the date. I just wish that I could use an input mask on it to only accept dates in the prompt box. Thanks for the help again!! Tim
 
Hi Tim
I do not understand why if you are running the query from a command on a form that you do not use the form to provide the input.
See attached simple example.

Brian
 

Attachments

Users who are viewing this thread

Back
Top Bottom