Form code auto update fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top