continuous form mode

  • Thread starter Thread starter alex
  • Start date Start date
A

alex

Using Access ’03…

Is there a way to programmatically open a form in continuous form
mode?

DoCmd.OpenForm(...continuous forms)

I’ve done some searching and it doesn’t appear so.

Thanks,
alex
 
Do you mean Datasheet view?

DoCmd.OpenForm "NameOfForm", acFormDS

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Using Access ’03…

Is there a way to programmatically open a form in continuous form
mode?

DoCmd.OpenForm(...continuous forms)

I’ve done some searching and it doesn’t appear so.

Thanks,
alex
 
Do you mean Datasheet view?

DoCmd.OpenForm "NameOfForm", acFormDS

--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no e-mails, please!)


Using Access ’03…

Is there a way to programmatically open a form in continuous form
mode?

DoCmd.OpenForm(...continuous forms)

I’ve done some searching and it doesn’t appear so.

Thanks,
alex

Hi Doug,

I’m talking about the same view as Properties > Default View >
Continuous Forms.

My database/form is setup to only display one record per form (in
single form view). Sometimes there are quasi duplicate records and
continuous forms is a good way to show multiple records on one screen.

alex
 
When you create the form, you have to indicate whehter it's Single Form,
Continuous Form or Datasheet. That means that the Form view can only be
either Single Form or Continuous Form.

You could use code like this

Sub OpenFormView(FormName As String, FormView As Long)
Dim frm As Form

If FormView = 0 Or FormView = 1 Or FormView = 2 Then
DoCmd.OpenForm FormName, acDesign
Set frm = Forms(FormName)
frm.DefaultView = FormView
DoCmd.Close acForm, FormName, acSaveYes
Set frm = Nothing
DoCmd.OpenForm FormName, acNormal
End If

End Sub

To open the form in Single Form view, you'd use

OpenFormView "MyFormName", 0

To open the form in Continuous Form view, you'd use

OpenFormView "MyFormName", 1


Note that this will only work if your application is properly split into a
front-end (containing the queries, forms, reports, macros and modules)
linked to a back-end, with each user having his/her own copy of the
front-end.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Do you mean Datasheet view?

DoCmd.OpenForm "NameOfForm", acFormDS

I’m talking about the same view as Properties > Default View >
Continuous Forms.

My database/form is setup to only display one record per form (in
single form view). Sometimes there are quasi duplicate records and
continuous forms is a good way to show multiple records on one screen.

alex
 
When you create the form, you have to indicate  whehter it's Single Form,
Continuous Form or Datasheet. That means that the Form view can only be
either Single Form or Continuous Form.

You could use code like this

Sub OpenFormView(FormName As String, FormView As Long)
Dim frm As Form

  If FormView = 0 Or FormView = 1 Or FormView = 2 Then
    DoCmd.OpenForm FormName, acDesign
    Set frm = Forms(FormName)
    frm.DefaultView = FormView
    DoCmd.Close acForm, FormName, acSaveYes
    Set frm = Nothing
    DoCmd.OpenForm FormName, acNormal
  End If

End Sub

To open the form in Single Form view, you'd use

OpenFormView "MyFormName", 0

To open the form in Continuous Form view, you'd use

OpenFormView "MyFormName", 1

Note that this will only work if your application is properly split into a
front-end (containing the queries, forms, reports, macros and modules)
linked to a back-end, with each user having his/her own copy of the
front-end.

--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no e-mails, please!)






I’m talking about the same view as Properties > Default View >
Continuous Forms.

My database/form is setup to only display one record per form (in
single form view).  Sometimes there are quasi duplicate records and
continuous forms is a good way to show multiple records on one screen.

alex

Thanks Doug. I'll give this a try.
alex
 
Back
Top