Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening a form

Status
Not open for further replies.

Nhubbard1214

Programmer
Jan 29, 2002
2
US
I need help opening a form in Access using a Visual Basic code. The form is called 'Switch' if you could help thanks.
 
Docmd.OpenForm

Good way to learn is by creating a blank form, then dropping a button on the form using the wizard and stepping through the Open Form option. Steve Medvid
"IT Consultant & Web Master"
 
I managed to figure this one out, from viewing some other codes. But how can i close a form window via a script other then by using a macro.
 
Private Sub cmdClose_Click()
On Error GoTo Err_Exit_Click
DoCmd.Close

Exit_Exit_Click:
Exit Sub

Err_Exit_Click:
MsgBox Err.DESCRIPTION
Resume Exit_Exit_Click

End Sub

Again, using the Wizard to create a button will generate this code. Steve Medvid
"IT Consultant & Web Master"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top