how to use form instead of msgbox to get answer

  • Thread starter Thread starter Song Su
  • Start date Start date
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
 
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.
 

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

Back
Top