Form code auto update fields

P

Phil

i have a form that i use to send out welcome letters and letters for
unconfirmed responses.

What VBA do i need to use to ensure that when i press a button, it
automatically ticks a tick box and adds a date to a date field on the form.
 
D

Debra Farnham

Hi Phil

Something like this should work:

Private Sub NameofButton_Click()

Me.nameofcheckbox = -1
Me.nameoftextbox = #whateverdateyouwant# (If today's date then Date())

End Sub

of course substituting the "Nameof" portion of the VBA to the actual names
of your controls.

HTH

Debra


Phil said:
i have a form that i use to send out welcome letters and letters for
unconfirmed responses.

What VBA do i need to use to ensure that when i press a button, it
automatically ticks a tick box and adds a date to a date field on the
form.
 
P

Phil

Thanks a lot that worked great

Phil

Debra Farnham said:
Hi Phil

Something like this should work:

Private Sub NameofButton_Click()

Me.nameofcheckbox = -1
Me.nameoftextbox = #whateverdateyouwant# (If today's date then Date())

End Sub

of course substituting the "Nameof" portion of the VBA to the actual names
of your controls.

HTH

Debra



form.
 
Top