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

Control Buttons 2

Status
Not open for further replies.

tarena

IS-IT--Management
Nov 28, 2005
70
0
0
US
I want one control button to enter the system time and date when clicked and the next time it is clicked to enter the same thing but as a new record. I am running Access 97. Can I do this?

Thanks
Tarena
 
How are ya tarena . . .

For new records have a look at the [blue]Default Value[/blue] property of a textbox.

For the button:
Code:
[blue]   Me![purple][b][i]TextboxName[/i][/b][/purple] = Now()[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
The code worked great TheAceMan1 but I can't get it to place the data into a new record each time...not the brightest I admit, real sorry.
 
tarena . . .

In the [blue]Default Value[/blue] property of the textbox enter:
Code:
[blue]=Now()[/blue]
Thats it! . . .

[blue]Do have a look at the faq at the bottom of my post . . .[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
I'm not sure how the faq was supposed to help with this issue but I tried your code in the Default Value of the textbox in the form and it did not create a new record when I clicked on my control button, not real sure as to what i'm doing wrong...
 
Try the following in the Click event procedure of the button:
Docmd.GoToRecord , , acNewRec

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top