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

J

jcervantes

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

Thanks,
 
M

Marshall Barton

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.
 
J

jcervantes

How about just switching from datasheet to regular form view? whats the code for that?
 
M

Marshall Barton

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
 
A

Adrian Jansen

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top