Continuous to Single Subform (1 Viewer)

Joshann

Registered User.
Local time
Today, 09:41
Joined
Mar 22, 2002
Messages
142
I have a subform that has its Default View set to Continuous. In one of the events in the subform, I'd like to add code that will switch the view of the subform to Single. I tried Me.DefaultView = 0, but I get an error message saying, "To set this property, open the form or report in design view." Is there any way I can programmatically change the view of a subform from within the subform?
 

RuralGuy

AWF VIP
Local time
Today, 08:41
Joined
Jul 2, 2005
Messages
13,826
As you have discovered, you can only change the view of a form while it is in design mode. If you really need both views then you may wish to create two forms and play around with their visibility.

Edit: It also sounds like you simply want to open another form when the user selects a particular record. That is done all of the time.
 

Joshann

Registered User.
Local time
Today, 09:41
Joined
Mar 22, 2002
Messages
142
RuralGuy said:
As you have discovered, you can only change the view of a form while it is in design mode. If you really need both views then you may wish to create two forms and play around with their visibility.

Edit: It also sounds like you simply want to open another form when the user selects a particular record. That is done all of the time.

Thank you very much. I figured I would have to use two separate forms. I was just hoping there was some way around that. Yes, I really do need both views -- I'm not just trying to open another form when the user selects a particular record.
 

Users who are viewing this thread

Top Bottom