How To hide Group header (1 Viewer)

Falcon88

Registered User.
Local time
Today, 14:09
Joined
Nov 4, 2014
Messages
297
Dear All

In my Db , Med. Lab Results
in RptMain
I want HeadSecndGrop is Hide if :
SubName , has one related Service (test).

and
if
i haven't enter all Group members of SubName (like in orderID 1)
 

Attachments

  • MySubGrps.accdb
    756 KB · Views: 219

Falcon88

Registered User.
Local time
Today, 14:09
Joined
Nov 4, 2014
Messages
297
More Explanation

I have Groups (MainName) , Subgroups (SubName) ,and Items (Services)
Items belongs to Subgroups and subgroups belongs to Groups.

Example.
in MainFrm
if i select (Enter) all the Items (Services) that belongs to the Subgroup "CBC" , as in (order 1).
In RptMain: i want to show Group Header "HeadSecndGrop" .
and
if i select (Enter) some of Items (Services) that belongs to the Subgroup "CBC" , as in (order 2).
in this case in RptMain: i want to hide Group Header "HeadSecndGrop" .

I want to do this in all SubGrpups.

I hope that you may well did you understand my request.

In this attachment ,there are some Amendment.
 

Attachments

  • NewMySubGrps.accdb
    464 KB · Views: 195
Last edited:

GinaWhipp

AWF VIP
Local time
Today, 07:09
Joined
Jun 21, 2011
Messages
5,901
You are going to need some sort of *trigger* to indicate whether it should show or not. So, do you have something like that in one of your Tables that could serve as a trigger?

Side note, I would also suggest you switch to a Report/Subreport scenario. Just seems a bit much to try to run everything from one query to one report. I can see this leading to issues down the road.

And I would also suggest you get some consistency across your Tables. Field names need to be consistent. As your database grows this will become important.
 

Falcon88

Registered User.
Local time
Today, 14:09
Joined
Nov 4, 2014
Messages
297
Please help me as it deems appropriate. do the right construction that you see fit to my database, according to your experience. Please amendment to my database attached above.
 

GinaWhipp

AWF VIP
Local time
Today, 07:09
Joined
Jun 21, 2011
Messages
5,901
Ahh, no... you need to amend the database and then I can review. Remember this is a Forum and the people, like myself, are unpaid volunteers using our spare time.

Now, I can help you to set up the proper tables but you will create the tables not me. And before we could even do that I would need to understand exactly what business model you are trying to follow.
 

Falcon88

Registered User.
Local time
Today, 14:09
Joined
Nov 4, 2014
Messages
297
the business model that i trying is a medical lab. db. in a village medical center.
 

GinaWhipp

AWF VIP
Local time
Today, 07:09
Joined
Jun 21, 2011
Messages
5,901
Okay, then where are the rest of the Tables? Are you doing just the Lab Tests?
 

Falcon88

Registered User.
Local time
Today, 14:09
Joined
Nov 4, 2014
Messages
297
i have attached an example that explain my current problem.
 

GinaWhipp

AWF VIP
Local time
Today, 07:09
Joined
Jun 21, 2011
Messages
5,901
And in Post#3 I told you what you need to do to get the results you want. Have you added a *trigger* to the Table?

Falcon, we are not here to write your database for you. We are UNPAID volunteers here to assist you... period. If you want someone to write your database for you please consider hiring a Developer. However, if you want help then add something to the Table that will be a trigger. The database needs to have some way of telling when/where you want something to show. It only does what you tell it do.
 

Falcon88

Registered User.
Local time
Today, 14:09
Joined
Nov 4, 2014
Messages
297
Ok Mr GinaWhipp .

I do not know what you mean about " trigger "
i do some changes.
 

Attachments

  • NewMySubGrps.zip
    31.9 KB · Views: 184

GinaWhipp

AWF VIP
Local time
Today, 07:09
Joined
Jun 21, 2011
Messages
5,901
There needs to be a field in your Table, like Show - Data Type Yes/No or something along those lines. Then in the report you can use that to determine whether or not the Subgroup Header shows.
 

GinaWhipp

AWF VIP
Local time
Today, 07:09
Joined
Jun 21, 2011
Messages
5,901
That file is the same one you already uploaded, nothing for me to do till you make the changes.
 

Falcon88

Registered User.
Local time
Today, 14:09
Joined
Nov 4, 2014
Messages
297
i add *Trigger*
and add sub report , as you suggest.
 

Attachments

  • NewMySubGrps1.zip
    35.8 KB · Views: 179

GinaWhipp

AWF VIP
Local time
Today, 07:09
Joined
Jun 21, 2011
Messages
5,901
Here you go...

You'll be able to see what I did by looking at the Recordsource of the Subreport.
 

Attachments

  • NewMySubGrps 8.8.2015.zip
    53.4 KB · Views: 174

GinaWhipp

AWF VIP
Local time
Today, 07:09
Joined
Jun 21, 2011
Messages
5,901
Setting the Default only applies to new records not existing ones. If you want the old ones to be *Yes* then you have to go in and check them. OR you can change my statement to read *False* instead of True.
 

Falcon88

Registered User.
Local time
Today, 14:09
Joined
Nov 4, 2014
Messages
297
Ok
very thanks
Why not make * trigger* in the query and use subquery ?
Please see to my new try , It is Correct Try ?
 

Attachments

  • NewMySubGrps4.zip
    151.3 KB · Views: 163

GinaWhipp

AWF VIP
Local time
Today, 07:09
Joined
Jun 21, 2011
Messages
5,901
Because then you can't edit the data and I thought you wanted to be able to edit...
 

Falcon88

Registered User.
Local time
Today, 14:09
Joined
Nov 4, 2014
Messages
297
what's about this try :

i thought this is exactly what's im want ?

Please note whether any errors must be corrected ....
 

Attachments

  • NewMySubGrps5.zip
    42.9 KB · Views: 172

GinaWhipp

AWF VIP
Local time
Today, 07:09
Joined
Jun 21, 2011
Messages
5,901
Please tell me what it is I am looking at and why. If it is giving you what you want.
 

Users who are viewing this thread

Top Bottom