how to use form instead of msgbox to get answer

S

Song Su

I want to use a form instead of msgbox to get user's answer because I want
to display several objects to the user.

On my frmConfirm form, I have two buttons cmdYes and cmdNo

My code is as follows:

DoCmd.OpenForm "frmConfirm", , , , , acDialog
If cmdYes of frmConfirm is clicked Then
DoCmd.OpenQuery "qryAddDayOneWinter", acNormal, acEdit
End If

My question is, how to know which button user clicked so I can put in IF to
conditionally excute my action query?

thanks.

- Song
 
A

AccessVandal via AccessMonster.com

My question is, how to know which button user clicked so I can put in IF to
conditionally excute my action query?

Answer is, you don’t.

In your OnClick event of the command button “cmdYesâ€,

Private Sub cmdYes_Click()

DoCmd.OpenQuery "qryAddDayOneWinter", acNormal, acEdit

End Sub.
 
Top