Default view in subform

G

Guest

Hi,
I want to have a command button to switch between form and datasheet view
for a subform. The command button is on the main form.

If it were just a normal form, I can close it with DoCmd.Close, then open
with DoCmd.OpenForm. However I don't know how (Or if) these commands can be
used on a subform.

Is this possible, or is there a more eliquent solution? Switch between two
forms perhaps (The same form but different defaultview property set)?


Thanks in advance.

Swas
 
D

Douglas J. Steele

One approach is to put both subforms on the parent form, and just make the
appropriate one visible.
 
G

Guest

Doug,
Yes I thought of that, and I suppose it is only a matter of managing one
form then saving a second copy with the different defaultview setting being
the only difference.

Programming is like skinning cats - there are so many ways... :)

Thanks

swas
 

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