Forms

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

Guest

I have a form in Microsoft Access, that has a OK button that I would like to
open in VBA programing. I get a Compile Error, Expected End Statement.

Option Compare Database

Private Sub CancelCmb_Click()
DoCmd.Close "Vendor List Form"
End Sub

Private Sub OKCmb_DblClick(Cancel As Integer)
DoCmd.OpenQuery "VenderOuerylist",acViewNormal,acReadOnly)
DoCmd.Close acForm, "Vendor List Form"
End Sub

Help?
 
You can only have one End Sub statement for each Sub statement. It appears
either someone has put in an extra End Sub or there is code missing.
 

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