Hi,
I am enjoying my first Access programming project and have found many answers to my questions on this forum. I'm not finding an answer to my latest problem, so I ask for your help.
I have a table that users can edit in a form. This one form is opened either as a continuous form (DoCmd.OpenForm strEditForm) or as a datasheet (DoCmd.OpenForm strEditForm, acFormDS).
To give my users multiple options, I want to open the same form a third way (split form), without creating a new form. (Note that I will have 20 tables plus a form for each table, so I don't want to create multiple forms for each table if I can avoid it.)
I cannot find a way to set the "Default View" option programmatically. The AcFormView Enumeration list doesn't show split form.
I found references to manipulating properties like this:
Forms!FormName.SplitFormOrientation = acDatasheetOnBottom.
This works, but only if the form is already set in Properties to "Split Form" before run time.
The approach I'm trying to take goes like this:
--DoCmd.OpenForm "EditForm", acDesign, , , , acHidden
--SET DEFAULT VIEW TO SPLIT FORM
--Forms!EditForm.SplitFormOrientation = acDatasheetOnBottom
--other settings...
--DoCmd.OpenForm "EditForm", acNormal, , , , acWindowNormal
-- User does some editing
-- When closing form, don't save it as split form (i.e., keep the default view as continuous form) or save as split form and convert back to continuous when user opens regular form view.
Is this possible or do I need to revert to some other method?
Thanks for your help.
Doug
I am enjoying my first Access programming project and have found many answers to my questions on this forum. I'm not finding an answer to my latest problem, so I ask for your help.
I have a table that users can edit in a form. This one form is opened either as a continuous form (DoCmd.OpenForm strEditForm) or as a datasheet (DoCmd.OpenForm strEditForm, acFormDS).
To give my users multiple options, I want to open the same form a third way (split form), without creating a new form. (Note that I will have 20 tables plus a form for each table, so I don't want to create multiple forms for each table if I can avoid it.)
I cannot find a way to set the "Default View" option programmatically. The AcFormView Enumeration list doesn't show split form.
I found references to manipulating properties like this:
Forms!FormName.SplitFormOrientation = acDatasheetOnBottom.
This works, but only if the form is already set in Properties to "Split Form" before run time.
The approach I'm trying to take goes like this:
--DoCmd.OpenForm "EditForm", acDesign, , , , acHidden
--SET DEFAULT VIEW TO SPLIT FORM
--Forms!EditForm.SplitFormOrientation = acDatasheetOnBottom
--other settings...
--DoCmd.OpenForm "EditForm", acNormal, , , , acWindowNormal
-- User does some editing
-- When closing form, don't save it as split form (i.e., keep the default view as continuous form) or save as split form and convert back to continuous when user opens regular form view.
Is this possible or do I need to revert to some other method?
Thanks for your help.
Doug