Assitance required for slow learner

  • Thread starter Thread starter DukeGuy
  • Start date Start date
D

DukeGuy

Guest
Hi everyone,

I've been looking on this forum (and the rest of www land) for a couple of days and I can't find what I need, so I thought I'd ask (nicely, of course) for some help.

I have a form that has a field called "StartTime" and one called "EndTime" Both are "General Date" formats.

The "StartTime" Field has a NOW () function to get the date when the record is created.

What I really need is a button that when you press, inserts the current time and date into the "EndTime" field.

I hope this makes sense and I hope that you can help (I told the boss I could use Access and have fallen at the 1st hurdle :( )

DukeGuy
 
In the OnClick property of the button type this


Me.YourFieldName = Now()


Thats it

Col
:cool:
 
I have just tried that but am getting the error:

"Micosoft Access Can't Find the macro 'Me.'

The macro (or its macro group) doesn't exist, or the macro is new but hasn't been saved.
Note that when you enter the macrogroupname.macroname syntax in an arguement, you must specify the name the macro's macro group was last saved under."


Help:confused: :(
 
Not sure why you are getting that message, however, instead of using Me.YourFieldName, try Forms!YourFormName!EndTime = Now
Make sure that the code is in the On Click Event procedure for the command button.


David
 
Sorry - I should have made it clear that it was in the event procedure of OnClick not on the line itself.

Col
;)
 

Users who are viewing this thread

Back
Top Bottom