buttons

  • Thread starter Thread starter DaveB
  • Start date Start date
D

DaveB

How do I make a button that will fill the time in a field
when I push it? Do I do this in a form or a table?
 
Create a query that updates the table with todays date
and/or time. Create a button which runs tha query.

Jim
 
Always use forms to view/edit your data.

In the design view of a form, drop a button on the form.
Then, right click, go to Properties. on the Events tab,
select the On Click event. This will occur whenever you
click the button.

Now, select the drop down, and select [Event Procedure].
Click the ... on the right.


You will see something like

Private Sub Command17_OnClick()

End Sub
 
Oops, sent too soon.


After the Private Sub line, type


Me.FieldName = Time()



Replace the FieldName with the name of the field. Let me
know if you have any other questions.



Chris
 
I guess there are lots of ways, but here is one, but you need to click
on it to up date it. No table needed, just a form, command button, and
text box.

Private Sub Command0_Click()
Dim stTime As Date
stTime = Now()
stTime = Right(stTime, 8)
Text1.SetFocus
Text1.Text = stTime
End Sub
 
Back
Top