How to Change a Subform from Datasheet to Cont. Forms in code

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

Guest

What is the method/property to change a subform from a datasheet to contious forms when a user clicks a button?

Thanks,
 
jcervantes said:
What is the method/property to change a subform
from a datasheet to contious forms when a user
clicks a button?

As far as I know, you can not switch into Continuous view
once you've used any other view.
 
jcervantes said:
How about just switching from datasheet to
regular form view? whats the code for that?


DoCmd.RunCommand acCmdFormView

But you can't use a button on the form to do this because
datasheet view only displays the sheet so there's no way to
display the button.

You could use the form's double click event, but that's kind
of ugly because the various parts of a datasheet already use
that select rows and/or columns..

Alternatively, you could switch views from a tool bar or
some other form, but, since DoCmd only operates on the
active object, you have to make sure the form has the focus
first.

Note: You can switch from form view to sheet view by using:

DoCmd.RunCommand acCmdDatasheetView
 
To provide this, its easier to do it the other way. Provide a form in
single or continuous view, which allows command buttons. Use one of the
buttons to open another form in datasheet view. Then when the user closes
this form, he is back to the form with the command buttons.

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
jcervantes said:
What is the method/property to change a subform from a datasheet to
contious forms when a user clicks a button?
 
Back
Top