Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert dividers in form for report purposes

Status
Not open for further replies.

NRK

Technical User
Feb 13, 2002
116
0
0
US
I have created a pop-up form that allows users to select multiple values (Case IDs) and publish a report based on those selected values. This works well, but there is one further need...

Within the listbox which holds the selected records, I would like to somehow insert predetermined values to serve as dividers. So, when the user wants to publish the report the data is correctly separated between the dividers.

An example (to clarify):
4 records

How it looks now -
TC1
TC2
TC3
TC4

How I want it to look -
Case section 1
TC1
TC2
Case section 2
TC3
Case section 3
TC4

I am unsure both on how to add these 'dividers' into the listbox and how to have code in the report understand what is happening and separate the data based upon these values.

Hopefully, I have explained this sufficiently but if not, please let me know. I am stumped and would appreciate any assistance.

Thanks.
 
You can add CASE SECTION as a field and group on that. The result would be:

Case section 1 TC1
Case section 1 TC2
Case section 2 TC3
Case section 3 TC4

Not pretty, but just a thought.

Hope this helps.

Jim "Get it right the first time, that's the main thing..." [wavey]
 
Jim - interested in your idea but am unsure on implementation.

I don't see how I could use a field ('Case Section') as an appropriate solution as I want to insert these dividers into the listbox.

My idea was that I would have code that would search for these dividers and grab information between them.

As I mentioned, I don't really have a solution yet and I may be misunderstanding yours so further input would be appreicated.

Thanks!
 
How to you determine that TC1 and TC2 belong to Case Section 1 and TC3 belongs to Case Section 2?

Also, what does "Case Section" mean?

We'll get there eventually.... ;-) "Get it right the first time, that's the main thing..." [wavey]
 
Jim -
How to you determine that TC1 and TC2 belong to Case Section 1 and TC3 belongs to Case Section 2?
My plan is to dynamically insert these 'dividers' into the listbox, so everything below the insert would be associated with it.

Another example:
Case Section 1
TC1
Case Section 2
TC2
TC3
Case Section 3
TC4

So, the logic would be that TC1 is part of Case Section 1, TC2 and TC3 are part of Case Section 2 and TC4 would be part of Case Section 3.

I haven't determined how this will occur - thus my initial creation of this thread.

Also, what does "Case Section" mean?
I don't know...I was just going off your first reply. You said that I could add "CASE SECTION" as a field.
 
Okay. In re-reading your initial question, I now understand what "Case Section" means and what you're trying to do. In your example, you arbitrarily associated TC1 with Case 1, and TC2 and TC3 with Case 2. It could easily have been where TC1 and TC3 were associated with Case 1, etc., all depending on your logic to associate the Case ID with a TC.

Furthermore, you will determine the criteria to assign the Case ID logic separately, but you're looking ahead in needing to know how to insert these associations in your dropdown box as headers.

I think the solution will be a slight offshoot of my original idea of adding a field to your TABLE. What I think you'll wind up doing is having the dropdown box's source being a QUERY rather than just the field from the table, and your association logic being an expression field in this query, where there would be 2 fields: Case ID (your expression Case ID logic) and TC, grouped on the Expression.

The result would still be something columnar, however:

Case 1 TC1
Case 1 TC2
Case 2 TC3
Case 3 TC4

rather than what you're looking to do:

Case 1
TC1
TC2
Case 2
TC3
Case 3
TC4

Dropdown box contents can be a list of many fields, but only from left to right.

Does this help?

Jim "Get it right the first time, that's the main thing..." [wavey]
 
You have defined my issue clearly. In terms of the solution, I do believe we are getting closer to a solution.

I don't really care if the user can see which Case (grouping level) each record has. More importantly, I want that to be clear in the report that would be generated.

Which is why I have the 'dividers' being inserted in the listbox rather than associated with individual records. Your solution makes sense and that may be the direction I have to take, but I would prefer something cleaner and more behind the scenes.

Let me know what you think...am I just going around in circles?

- Ben
 
Ben:

No...I don't think you're going around in circles. I'm clear as to what you want, but I really know of no way to insert "dividers" into a listbox.

I'm sorry that I wasn't able to help you with that, and that I dragged it out for 2 days.

I hope someone else will pick up on this thread. I'm keeping the notification on because I'm interested in the final solution.

Good luck!

Jim "Get it right the first time, that's the main thing..." [wavey]
 
Jim - thanks so much for your input and time. Hopefully, this will have a positive resolution.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top