close forms!????

MikeUK

Registered User.
Local time
Today, 13:44
Joined
Dec 14, 2000
Messages
36
i havent used VB for a while, so im a bit rusty, but i was lookin at my old work and for some unknow reason i keep gettin an error when i use almost identical code for work im doing now.

what i want to do is close one form, and open another by pressing one button. b4 i was using Microsft Access and now im just using the VB directly thru the same (i think) Microsft program.

DoCmd.Close acForm, "Form2"

DoCmd.OpenForm "Form1"

thats my code, i got the end sub and everything else to.

help!!


:confused: :confused: :confused: :confused: :confused:
 
This is the way I close one form and open another.

DoCmd.OpenForm "FormName", acNormal
DoCmd.Maximize
DoCmd.Close acForm, "OtherForm"
 
thanx ill give it a go later today and get tell you in here if it works! :D
 
Try...

DoCmd.OpenForm "YourFormNameHere"
DoCmd.Close acForm, Me.Name 'do not need the form name

HTH
 

Users who are viewing this thread

Back
Top Bottom