VB code to change continuous subform to single form 
Author Message
 VB code to change continuous subform to single form

This code goes behind a click event of a button.  I use a static boolean to
toggle between the two.  I think this is what you're looking for.

In addition, I think the "Allow Form View" and "Allow Datasheet View"
properties of the form must be set to "Yes".

    Static blnDataSheetView As Boolean
    blnDataSheetView = Not blnDataSheetView

    Me.MySubform.SetFocus
    If blnDataSheetView Then
        Application.RunCommand acCmdSubformDatasheetView
    Else
        Application.RunCommand acCmdSubformFormView
    End If

Quote:

> Hi
> Is it possible to change a continuous subform into single view using VB?
> If so, What is the code?

> Thanks

> rich



Tue, 01 Apr 2008 01:51:05 GMT  
 VB code to change continuous subform to single form
Hi David

Thanks for your post.  
It works in putting the form into Datasheet View; however this is not the
same as Form in Single View, when just one record can be displayed.  This is
what I am after.

rich

Quote:

> This code goes behind a click event of a button.  I use a static boolean to
> toggle between the two.  I think this is what you're looking for.

> In addition, I think the "Allow Form View" and "Allow Datasheet View"
> properties of the form must be set to "Yes".

>     Static blnDataSheetView As Boolean
>     blnDataSheetView = Not blnDataSheetView

>     Me.MySubform.SetFocus
>     If blnDataSheetView Then
>         Application.RunCommand acCmdSubformDatasheetView
>     Else
>         Application.RunCommand acCmdSubformFormView
>     End If


> > Hi
> > Is it possible to change a continuous subform into single view using VB?
> > If so, What is the code?

> > Thanks

> > rich



Tue, 01 Apr 2008 22:09:04 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Change subform view from continuous to single in code

2. Changing from Single Form to Continuous Forms

3. Continuous Subforms and changing single record

4. Change one unbound field on a continuous form view subform and they all change

5. background color won't change in subform control (default continuous form)

6. background color won't change in subform control (default continuous form)

7. Changing Control Properties on Continuous Form Subform

8. Continuous Forms with a (continuous) subform !

9. Continuous subform in a continuous form?

10. Click on record in continuous form to go to same record in single form view


 
Powered by phpBB® Forum Software © phpBB Group