Check Contents of Check Box

A

arnold

I have the following code:

Dim outobj As Outlook.Application
Dim outappt As Outlook.AppointmentItem
Set outobj = CreateObject("outlook.application")
Set outappt = outobj.CreateItem(olAppointmentItem)

With outappt
.Start = Me.NextContact & " " & Me.ApptTime
.Duration = 30
.Subject = "Call Back " & Forms!ApplicantsForm.FirstName & " "
& Forms!ApplicantsForm.LastName
.Save
End With

Set outobj = Nothing

DoCmd.RunCommand acCmdSaveRecord

I want to do this automatically when a check box is checked. I want
this event, which is in a subform, to occur when I navigate away from
the parent record. Is there any way to do that? I have spent 2 hours
attempting it with no success. Any help would be great!
 
D

Dale Fye

If you have made a change to the parent record, then it has a before update
event that will fire if you have made any updates to that record. But if
this checkbox is not bound to the dataset that the form is built upon, that
event may not fire.

Is there a reason you don't want it to fire when it is first checked? If
you use the built in navigation buttons, there may not be a good event to do
this (assuming no other changes to the record). I will frequently create my
own navigation buttons when I want to do something like this, that would
allow me to fire off my own code before moving to another record.

HTH
Dale
 
A

arnold

Thanks! I think I will just add a button to my menu for this. This
will work just fine.
 

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

Top