473,473 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Switching veiws on a subform...

I have a a parent form with a subform. The parent form has two command
buttons to change the subform view to single form view and datasheet view
respectively. I can't seem to get this to work. There is a menu item to
switch to datasheet view, but it won't go back to form view. The only way I
see so far is to open the subform by itself in design view, change the
default view, save & close, then set the sourceobject property in the main
form. Needless to say this is ugly and takes a lot of time. Is there an
easier way?

Thanks.

Matthew Wells
MW****@FirstByte.net
Nov 13 '05 #1
1 1987
Hi,

Played around with your form/subform requirements, couldn't get it to work
by switching the views - got error messages re only being able to set this
criteria while in design mode. So tried this as a workaround, perhaps it
will meet your needs.

I designed a main form and two subforms. Each subform is based on the same
data but one has a default view of datasheet and the other a default view of
single form. One subform has the default of visible = true and the other
visible = false. While in design mode move one subform to lie over the
other then...

Private Sub cmdDatasheet_Click()
Me.mySubFormDatasheet.Visible = True
Me.mySubFormSingleForm.Visible = False
End Sub

Private Sub cmdSingleForm_Click()
Me.mySubFormSingleForm.Visible = True
Me.mySubFormDatasheet.Visible = False
End Sub

HTH -Linda

"Matthew Wells" <MW****@FirstByte.net> wrote in message
news:Q3****************@newsread2.news.atl.earthli nk.net...
I have a a parent form with a subform. The parent form has two command
buttons to change the subform view to single form view and datasheet view
respectively. I can't seem to get this to work. There is a menu item to
switch to datasheet view, but it won't go back to form view. The only way I see so far is to open the subform by itself in design view, change the
default view, save & close, then set the sourceobject property in the main
form. Needless to say this is ugly and takes a lot of time. Is there an
easier way?

Thanks.

Matthew Wells
MW****@FirstByte.net

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Rey | last post by:
Howdy all. Appreciate your help with several problems I'm having: I'm trying to determine if the Visit subform (subformVisits) has a new record or been changed, i.e. dirty. The form that...
0
by: Jerry Boone | last post by:
Situation: In the process of building a wondrous desktop form to display "grand functionality"... Access has presented me with the challenge of combining multiple forms onto one single unbound...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
1
by: John Michael | last post by:
I have a form that has a subform that has a subform. The subform loads a record based on a combo lookup box in the main form. I'm trying to set a value in the subform based on a value in a...
4
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
1
by: Dave Alger | last post by:
Hi, I've got a subform which has its default view set to "Continuous Forms". What I want to be able to do is switch programatically between "Continuous" and "Single". I note that most View...
6
by: DMUM via AccessMonster.com | last post by:
Hello I am trying to pass the name of my subform to a function/sub but I can't seem to get it to work. I am using an autokey function (ctrl E) to unlock text boxes on a subform. I have a few...
2
by: LeeAnne | last post by:
Hallo there, I need your help! I have two different forms. Each of them has got the same subform. What I am trying to do is to open the 2nd form by pushing a button on the 1rst form. I now that a...
1
by: cbayr249 | last post by:
I'm currently making a database for a research project and I keep running into a problem. I have one master form with the tab control and several subforms. Each subform is backed by a table that are...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.