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.
 
Back
Top