Link to home
Create AccountLog in
Avatar of developingprogrammer
developingprogrammer

asked on

me.visible = false in Private Sub Form_Activate() does not hide form

hey guys, how come me.visible = false in Private Sub Form_Activate() does not hide form?

Private Sub Form_Activate()
    'DoCmd.OpenForm "Workflow", acNormal
    'CreateNewGenericFormInstance1
    Me.Visible = False
End Sub

Open in new window

SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Alternatively, hide it immediately after opening it (I prefer the WindowMode approach):

DoCmd.OpenForm "FormName"
Forms("FormName").Visible = False

Open in new window

SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of developingprogrammer
developingprogrammer

ASKER

thanks guys, i'm opening a hidden form when the database starts and this hidden form opens the real startup form. problem is, i don't know how to hide this hidden form upon startup haha.

well i mean i could make the form hidden from the real startup form but then it's not so self maintaining in the sense if i were to choose another startup form then i will have to manually move the code to the new startup form.

how do i:
1) open hidden form once DB starts up - done
2) use hidden form to open start up form - done
3) hide hidden from once it runs its code - don't know how to do!
hopefully i can avoid using the autoexec macro.

is there a way that i can avoid autoexec's macro and instead use a autoexec VBA? when i say macro i mean those that i select from Access' user interface. i rather learn how to become a hardcore programmer!! = ))
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Yup sounds great!! I will do just that = )

Is there any way to run VBA code on startup without using the autoexec access macro?
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Ok guys I'll follow your recommendation and use autoexec macro as the exception!!  = ))