Group:  Microsoft Access ยป microsoft.public.access.gettingstarted
Thread: Editing Sub Forms

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Editing Sub Forms
Ray C 16.09.2006 10:29:02
I have a general information form that displays names, addresses etc from the
"Customers Table and I also have a sub form "frm_sub_ExtraInfo" that I
display in the main form. Both forms get their inf from the Cutomers Table.
The "Extra Info" is in a sub form because I want to hide or show all the
information easily and without going through a routine of fiealdname.visible
= True / False over and over again. Just doing "frm_sub_ExtraInfo.visible =
True / False" does everything for me.

All works well until I want to edit the fields. The expression Me.allowEdits
= True / False, allows me to make changes to the main form but not to the sub
form. trying to be specific to the sub form with the expression
frm_sub_ExtraInfo.AllowEdits = True and then I have tried
Form.frm_sub_ExralInfo.AllowEdits = True but I get errors like "Data Member
not found" which means I am usinf the wrong wording somewhere. Can anyone
help?
Thanks RayC
Re: Editing Sub Forms
"Rick Brandt" <rickbrandt2[ at ]hotmail.com> 16.09.2006 11:04:26
Ray C wrote:
[Quoted Text]
> I have a general information form that displays names, addresses etc
> from the "Customers Table and I also have a sub form
> "frm_sub_ExtraInfo" that I display in the main form. Both forms get
> their inf from the Cutomers Table. The "Extra Info" is in a sub form
> because I want to hide or show all the information easily and without
> going through a routine of fiealdname.visible = True / False over and
> over again. Just doing "frm_sub_ExtraInfo.visible = True / False"
> does everything for me.
>
> All works well until I want to edit the fields. The expression
> Me.allowEdits = True / False, allows me to make changes to the main
> form but not to the sub form. trying to be specific to the sub form
> with the expression frm_sub_ExtraInfo.AllowEdits = True and then I
> have tried Form.frm_sub_ExralInfo.AllowEdits = True but I get errors
> like "Data Member not found" which means I am usinf the wrong wording
> somewhere. Can anyone help?
> Thanks RayC

Having two forms bound to the same record will cause all kinds of conflicts when
editing, but you can get what you want without a subform.

Instead of a subform use a TabControl with a single TabPage and with the
TabStyle set to "None". Showing/Hiding the TabControl will still Hide/Show all
the controls on the control with a simple command, but you won't have the
problems that using a subform cause.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


Re: Editing Sub Forms
RayC 16.09.2006 13:45:01
Hi Rick thanks for the response.
It may be out of my ignorance of the use of Tabs but I don't think that this
solves my problem. My current form has a number of "Find" Combo Boxes allong
with a number of Text boxes for the general information like name, address
etc. The extra info is what I want to show or hide at various stages of the
Form's use. If my understaning of Tabs is correct, I would need to have a
duplicate form with the "Find" Combo Boxes and all of the general information
on both Forms and one of the forms with all of the Extra Info Text Boxes.
Duplicating all of theose boxes does not sound like a good idea.

RayC

"Rick Brandt" wrote:

[Quoted Text]
> Ray C wrote:
> > I have a general information form that displays names, addresses etc
> > from the "Customers Table and I also have a sub form
> > "frm_sub_ExtraInfo" that I display in the main form. Both forms get
> > their inf from the Cutomers Table. The "Extra Info" is in a sub form
> > because I want to hide or show all the information easily and without
> > going through a routine of fiealdname.visible = True / False over and
> > over again. Just doing "frm_sub_ExtraInfo.visible = True / False"
> > does everything for me.
> >
> > All works well until I want to edit the fields. The expression
> > Me.allowEdits = True / False, allows me to make changes to the main
> > form but not to the sub form. trying to be specific to the sub form
> > with the expression frm_sub_ExtraInfo.AllowEdits = True and then I
> > have tried Form.frm_sub_ExralInfo.AllowEdits = True but I get errors
> > like "Data Member not found" which means I am usinf the wrong wording
> > somewhere. Can anyone help?
> > Thanks RayC
>
> Having two forms bound to the same record will cause all kinds of conflicts when
> editing, but you can get what you want without a subform.
>
> Instead of a subform use a TabControl with a single TabPage and with the
> TabStyle set to "None". Showing/Hiding the TabControl will still Hide/Show all
> the controls on the control with a simple command, but you won't have the
> problems that using a subform cause.
>
> --
> Rick Brandt, Microsoft Access MVP
> Email (as appropriate) to...
> RBrandt at Hunter dot com
>
>
>
Re: Editing Sub Forms
"Rick Brandt" <rickbrandt2[ at ]hotmail.com> 16.09.2006 14:59:40
RayC wrote:
[Quoted Text]
> Hi Rick thanks for the response.
> It may be out of my ignorance of the use of Tabs but I don't think
> that this solves my problem. My current form has a number of "Find"
> Combo Boxes allong with a number of Text boxes for the general
> information like name, address etc. The extra info is what I want to
> show or hide at various stages of the Form's use. If my understaning
> of Tabs is correct, I would need to have a duplicate form with the
> "Find" Combo Boxes and all of the general information on both Forms
> and one of the forms with all of the Extra Info Text Boxes.
> Duplicating all of theose boxes does not sound like a good idea.

It would appear your understanding of TabControls is not correct. They are
nothing more than a way to control the real estate on your form. If you make a
TabControl with a single page then it essentially becomes a frame with controls
on it. If you hide the frame you will also hide all the controls on it.

If hiding/showing a subform (essentially a rectangular area on your form) then
hiding/showing a TabControl should also work. There is no reason why you would
need two forms. You would just take the controls that are currently on your
subform and duplicate those on your main form, but also placing them onto the
TabControl page.


--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


Re: Editing Sub Forms
RayC 19.09.2006 08:59:02
Hi Rick

I now have a Tab that contains all of the Text Boxes that were in my "Sub
Form" and I can Hide or Show that Tab, Great! However the Tab shows as ans
ALL WHITE box and I want it to blend in with the rest of the form. I can not
find any properties to set the Back colour of the Tab, is there any way to do
that?
Regards RayC


"Rick Brandt" wrote:

[Quoted Text]
> RayC wrote:
> > Hi Rick thanks for the response.
> > It may be out of my ignorance of the use of Tabs but I don't think
> > that this solves my problem. My current form has a number of "Find"
> > Combo Boxes allong with a number of Text boxes for the general
> > information like name, address etc. The extra info is what I want to
> > show or hide at various stages of the Form's use. If my understaning
> > of Tabs is correct, I would need to have a duplicate form with the
> > "Find" Combo Boxes and all of the general information on both Forms
> > and one of the forms with all of the Extra Info Text Boxes.
> > Duplicating all of theose boxes does not sound like a good idea.
>
> It would appear your understanding of TabControls is not correct. They are
> nothing more than a way to control the real estate on your form. If you make a
> TabControl with a single page then it essentially becomes a frame with controls
> on it. If you hide the frame you will also hide all the controls on it.
>
> If hiding/showing a subform (essentially a rectangular area on your form) then
> hiding/showing a TabControl should also work. There is no reason why you would
> need two forms. You would just take the controls that are currently on your
> subform and duplicate those on your main form, but also placing them onto the
> TabControl page.
>
>
> --
> Rick Brandt, Microsoft Access MVP
> Email (as appropriate) to...
> RBrandt at Hunter dot com
>
>
>
Re: Editing Sub Forms
"Rick Brandt" <rickbrandt2[ at ]hotmail.com> 19.09.2006 11:30:02
RayC wrote:
[Quoted Text]
> Hi Rick
>
> I now have a Tab that contains all of the Text Boxes that were in my
> "Sub Form" and I can Hide or Show that Tab, Great! However the Tab
> shows as ans ALL WHITE box and I want it to blend in with the rest of
> the form. I can not find any properties to set the Back colour of the
> Tab, is there any way to do that?
> Regards RayC

Set the BackStyle property to Transparent.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


Re: Editing Sub Forms
RayC 19.09.2006 15:59:03

Tried it and the Tab is still White. I must be missing something.
RayC

"Rick Brandt" wrote:

[Quoted Text]
> RayC wrote:
> > Hi Rick
> >
> > I now have a Tab that contains all of the Text Boxes that were in my
> > "Sub Form" and I can Hide or Show that Tab, Great! However the Tab
> > shows as ans ALL WHITE box and I want it to blend in with the rest of
> > the form. I can not find any properties to set the Back colour of the
> > Tab, is there any way to do that?
> > Regards RayC
>
> Set the BackStyle property to Transparent.
>
> --
> Rick Brandt, Microsoft Access MVP
> Email (as appropriate) to...
> RBrandt at Hunter dot com
>
>
>
Re: Editing Sub Forms
John Nurick <j.mapSoN.nurick[ at ]dial.pipex.com> 19.09.2006 20:42:05
IIRC this can happen if you're using Windows XP, Access 2003 and have
selected Use Windows Themed Controls on Forms.

On Tue, 19 Sep 2006 08:59:03 -0700, RayC
<RayC[ at ]discussions.microsoft.com> wrote:


[Quoted Text]
>Tried it and the Tab is still White. I must be missing something.
>RayC
>
>"Rick Brandt" wrote:
>
>> RayC wrote:
>> > Hi Rick
>> >
>> > I now have a Tab that contains all of the Text Boxes that were in my
>> > "Sub Form" and I can Hide or Show that Tab, Great! However the Tab
>> > shows as ans ALL WHITE box and I want it to blend in with the rest of
>> > the form. I can not find any properties to set the Back colour of the
>> > Tab, is there any way to do that?
>> > Regards RayC
>>
>> Set the BackStyle property to Transparent.
>>
>> --
>> Rick Brandt, Microsoft Access MVP
>> Email (as appropriate) to...
>> RBrandt at Hunter dot com
>>
>>
>>

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
Re: Editing Sub Forms
RayC 20.09.2006 09:17:02
Using XP, never heard of "Use Windows Themes on Forms" where is it and how
can I turn it off?

Thanks RayC

"John Nurick" wrote:

[Quoted Text]
> IIRC this can happen if you're using Windows XP, Access 2003 and have
> selected Use Windows Themed Controls on Forms.
>
> On Tue, 19 Sep 2006 08:59:03 -0700, RayC
> <RayC[ at ]discussions.microsoft.com> wrote:
>
>
> >Tried it and the Tab is still White. I must be missing something.
> >RayC
> >
> >"Rick Brandt" wrote:
> >
> >> RayC wrote:
> >> > Hi Rick
> >> >
> >> > I now have a Tab that contains all of the Text Boxes that were in my
> >> > "Sub Form" and I can Hide or Show that Tab, Great! However the Tab
> >> > shows as ans ALL WHITE box and I want it to blend in with the rest of
> >> > the form. I can not find any properties to set the Back colour of the
> >> > Tab, is there any way to do that?
> >> > Regards RayC
> >>
> >> Set the BackStyle property to Transparent.
> >>
> >> --
> >> Rick Brandt, Microsoft Access MVP
> >> Email (as appropriate) to...
> >> RBrandt at Hunter dot com
> >>
> >>
> >>
>
> --
> John Nurick [Microsoft Access MVP]
>
> Please respond in the newgroup and not by email.
>
Re: Editing Sub Forms
RayC 20.09.2006 09:20:02
Hi John

Forget my last e-mail. I found it, turned it off and all looks good at the
moment.

Deeply gratefull for all your help.
Ray C


"John Nurick" wrote:

[Quoted Text]
> IIRC this can happen if you're using Windows XP, Access 2003 and have
> selected Use Windows Themed Controls on Forms.
>
> On Tue, 19 Sep 2006 08:59:03 -0700, RayC
> <RayC[ at ]discussions.microsoft.com> wrote:
>
>
> >Tried it and the Tab is still White. I must be missing something.
> >RayC
> >
> >"Rick Brandt" wrote:
> >
> >> RayC wrote:
> >> > Hi Rick
> >> >
> >> > I now have a Tab that contains all of the Text Boxes that were in my
> >> > "Sub Form" and I can Hide or Show that Tab, Great! However the Tab
> >> > shows as ans ALL WHITE box and I want it to blend in with the rest of
> >> > the form. I can not find any properties to set the Back colour of the
> >> > Tab, is there any way to do that?
> >> > Regards RayC
> >>
> >> Set the BackStyle property to Transparent.
> >>
> >> --
> >> Rick Brandt, Microsoft Access MVP
> >> Email (as appropriate) to...
> >> RBrandt at Hunter dot com
> >>
> >>
> >>
>
> --
> John Nurick [Microsoft Access MVP]
>
> Please respond in the newgroup and not by email.
>
Re: Editing Sub Forms
John Nurick <j.mapSoN.nurick[ at ]dial.pipex.com> 20.09.2006 19:08:54
Glad it's working. Thanks for the feedback.

On Wed, 20 Sep 2006 02:20:02 -0700, RayC
<RayC[ at ]discussions.microsoft.com> wrote:

[Quoted Text]
>Hi John
>
>Forget my last e-mail. I found it, turned it off and all looks good at the
>moment.
>
>Deeply gratefull for all your help.
>Ray C
>
>
>"John Nurick" wrote:
>
>> IIRC this can happen if you're using Windows XP, Access 2003 and have
>> selected Use Windows Themed Controls on Forms.
>>
>> On Tue, 19 Sep 2006 08:59:03 -0700, RayC
>> <RayC[ at ]discussions.microsoft.com> wrote:
>>
>>
>> >Tried it and the Tab is still White. I must be missing something.
>> >RayC
>> >
>> >"Rick Brandt" wrote:
>> >
>> >> RayC wrote:
>> >> > Hi Rick
>> >> >
>> >> > I now have a Tab that contains all of the Text Boxes that were in my
>> >> > "Sub Form" and I can Hide or Show that Tab, Great! However the Tab
>> >> > shows as ans ALL WHITE box and I want it to blend in with the rest of
>> >> > the form. I can not find any properties to set the Back colour of the
>> >> > Tab, is there any way to do that?
>> >> > Regards RayC
>> >>
>> >> Set the BackStyle property to Transparent.
>> >>
>> >> --
>> >> Rick Brandt, Microsoft Access MVP
>> >> Email (as appropriate) to...
>> >> RBrandt at Hunter dot com
>> >>
>> >>
>> >>
>>
>> --
>> John Nurick [Microsoft Access MVP]
>>
>> Please respond in the newgroup and not by email.
>>

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net