Control button to enter time

mkelly

Registered User.
Local time
Today, 16:23
Joined
Apr 10, 2002
Messages
213
I have a database for records management and I set up a form to check the boxes back in. I am using a control button to run a macro that when clicked it will enter the date into the date returned check box. This works in other databases that I have however, in this one when clicked it will put the date in the table but will not show up in the text box unless I move to another record and then back to that record. Could this be because I am running the form off of a query instead of the table? Any Ideas? Any help appriciated.

thanks
 
Have you tried a docmd.requery or docmd.refresh after the code that inputs the date?
 
I tried both of your examples however when it requeies it only pulls records where the date returned is null so once the button is clicked the record disapears
 
mkelly,

What does the query have for criteria. Does it look for Null
dates?

Wayne
 
Yes the Query looks for the "Date Returned" to be null. After fighting over this for a few hours I finally decided to change the macro so that after the control button is clicked I have it go to the next record and then go to the previouse record so that the date shows on the form. The user cannot tell that the records are moving only that the date pops up in the text box. I know there are probably better ways to do this but I was out of Ideas.
 
I don't know why you are using a macro for this. All you need is a single line of code in the click event of the button:

Me.SomeDateField = Date()

or if you want to store date and time:

Me.SomeDateField = Now()
 

Users who are viewing this thread

Back
Top Bottom