Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / May 2007

Tip: Looking for answers? Try searching our database.

Forms and subforms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Amateur - 21 May 2007 16:06 GMT
I have a form where I would like to integrate subforms. (OK, no problem)
I would like that, if I have i.e. subforms, 1,2 and 3, only that subform is
shown where as well data is in. Empty subforms I don’t want to see.

Is that possible and if yes, how?
Thanks
Klaus
Ofer Cohen - 21 May 2007 16:16 GMT
On the form LoadEvent you can use this code

Me.[SubFormControlName].Visible =
(Me.[SubFormControlName].Form.RecordSetClone.RecordCount > 0)

Signature

Good Luck
BS"D

> I have a form where I would like to integrate subforms. (OK, no problem)
> I would like that, if I have i.e. subforms, 1,2 and 3, only that subform is
[quoted text clipped - 3 lines]
> Thanks
> Klaus
Amateur - 21 May 2007 16:28 GMT
Following your answer I have another question.
Is it than as well possible to open a subform in the main form with a
command of a command button?
If yes, can you as well tell me how?
Thanks
Klaus

> On the form LoadEvent you can use this code
>
[quoted text clipped - 8 lines]
> > Thanks
> > Klaus
Ofer Cohen - 21 May 2007 16:34 GMT
What do you mean by openning a sub form?

You can make it visible, if it's already linked to the main form
Me.[SubFormControlName].Visible = True

Or, open it as a seperate form
Docmd.OpenForm "SubFormName"

Signature

Good Luck
BS"D

> Following your answer I have another question.
> Is it than as well possible to open a subform in the main form with a
[quoted text clipped - 15 lines]
> > > Thanks
> > > Klaus
Amateur - 21 May 2007 16:44 GMT
My mistake, I did not explain good enough - sorry.
Yes, I know I can open a form with a command button.
So, I have a main form with customer details - than I need for our business
three more forms to create an offer. 1st form for a cemetery offer, 2nd form
for a normal gardening offer and the 3rd form for a normal plants offer.
The layout would be much nicer if I use three command buttons which are
opening the specific forms in the main form (like a subform).
If that is not possible than I have to create three seperate forms and use
your 1st idea for the main form.
My question was if it is possible, and how it is possible, to open with a
command button, instead of a seperate form a subform in the main form.
Thanks
Klaus

> What do you mean by openning a sub form?
>
[quoted text clipped - 23 lines]
> > > > Thanks
> > > > Klaus
Ofer Cohen - 21 May 2007 16:57 GMT
One option will be to use a Tab in the form and dispaly a sub form in each Tab

Second option, you can have one sub form control on the form, and using the
button you can change the sub form in that control

Me.[SubFormControlName].SourceObject = "SubFormName"

Signature

Good Luck
BS"D

> My mistake, I did not explain good enough - sorry.
> Yes, I know I can open a form with a command button.
[quoted text clipped - 37 lines]
> > > > > Thanks
> > > > > Klaus
Amateur - 21 May 2007 17:10 GMT
Dear Ofer,
Sorry, I don't want to go on your nervs but your

Me.[SubFormControlName].SourceObject = "SubFormName"
I changed like this:
Me.[cemeteryoffer].SourceObject = "gardenoffer"

cemeteryoffer is the subform already open in the main form. gardenoffer
should open in the same place at cemeteryoffer if I click the command button.
Can you tell me what is wrong with my code because nothing happens, not even
an error message.
Thanks
klaus

> One option will be to use a Tab in the form and dispaly a sub form in each Tab
>
[quoted text clipped - 44 lines]
> > > > > > Thanks
> > > > > > Klaus
Amateur - 21 May 2007 17:26 GMT
Thanks for your help - problem solved it's working

> One option will be to use a Tab in the form and dispaly a sub form in each Tab
>
[quoted text clipped - 44 lines]
> > > > > > Thanks
> > > > > > Klaus
Amateur - 21 May 2007 16:59 GMT
CONTINUATION:
Maybe I can explain my above post easier.
Is it possible to use the main form like a frame page (Like in Front page)
so that those forms can open in the frame?

> My mistake, I did not explain good enough - sorry.
> Yes, I know I can open a form with a command button.
[quoted text clipped - 37 lines]
> > > > > Thanks
> > > > > Klaus
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.