Open form in same window

swmasson

Registered User.
Local time
Today, 22:00
Joined
Apr 21, 2004
Messages
12
Hi there,

Does anyone know how i could open a new form when a button in pressed and at the same tim close the form that contained that biutton which was just pressed?

Form 1 - has a button called "form 2", when the form 1 button is pressed form 1 will close and form 2 will open, almost like a website.

I hope i have explained this well enough.

Thanks for your help.

Kind regards

Steve
 
Code:
DoCmd.OpenForm "Form2", acNormal
DoCmd.Close acForm, Me.Name
 
Mile-O-Phile said:
Code:
DoCmd.OpenForm "Form2", acNormal
DoCmd.Close acForm, Me.Name


Thanks for the reply,

I had your script workig fine, however, with the button i'm trying to do it with now seems to be different, could someone please tell me how i would do the same to the script below?

Thanks very much


Steve




Private Sub About_button_Click()
On Error GoTo Err_About_button_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "001_about_top"
DoCmd.OpenForm stDocName, , , stLinkCriteria


Exit_About_button_Click:
Exit Sub

Err_About_button_Click:
MsgBox Err.Description
Resume Exit_About_button_Click

End Sub
 

Users who are viewing this thread

Back
Top Bottom