VB code to change continuous subform to single form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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


Thanks

rich
 
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 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
 
Back
Top