yes/no Code

C

cmichaud

I am trying to write a code that i put in the afterupdate event of a
box. The VB code is a yes/no. If the user hits yes i want it to go to
a new record in the same form. If the user hits no i want it to go to
a different control in a different form. Both of these forms are
subforms.

This is what i got.

Private Sub AllergyID_AfterUpdate()
If MsgBox("Do you want to add another Allergy?", vbQuestion & vbYesNo)
= vbYes Then
DoCmd.GoToRecord , , acNewRec

Else
(This is what i dont know)

End If
End Sub

Please help. Newbie
 

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