Farmgirl
asked on
How to change Access form view with VBA?
Is there a way to change a form's view form single to continuous with VBA Code?
me thinks, you will need two forms , one single and one continuous, open accordingly.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
For reference, here is the code: it closes Form1 if needed, changes the default view in design mode, closes and reopens it.
(°v°)
(°v°)
If SysCmd(acSysCmdGetObjectState, acForm, "Form1") Then _
DoCmd.Close acForm, "Form1"
DoCmd.OpenForm "Form1", acDesign
Forms("Form1").DefaultView = 1 ' continuous
DoCmd.Close acForm, "Form1", acSaveYes
DoCmd.OpenForm "Form1"
ASKER
These answers Informed me that I couldn't do what I wanted so I found a workaround through other coding on the form. I didn't think through want I wanted to do so the coding wasn't apparent at first.