Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 13th, 2006, 10:20 AM
Authorized User
 
Join Date: Oct 2006
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default Grouping Within a Report for labels

Hi all,
I've got a question that's been a bit difficult for me to figure out. I've got a table structure like the following:

Device Type Panel Tag Location Comm
Yellow Wing 12 STR301 A939 909-3435
Yellow Wing 12 STR302 A939 909-3436
Red Foot 12 STY301 A938 909-2543

Etc. I'm trying to use a report to generate lables setup like the following:

   Yellow Device
    Wing Type
STR301 909-3435 Tag(s) Comm(s)
STR302 909-3436

Basically I need only one instance of the device but all the tags associated with it on the lable. I have the tag format made but I can't seem to get the grouping down. Any ideas?

Thanks in advance for your help,
ermy
 
Old December 13th, 2006, 12:00 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

What do you mean by "on the label?"

If you mean report, then group by Device, then by Type, then use Tag and Comm in the Detail section.

mmcdonal
 
Old December 13th, 2006, 12:51 PM
Authorized User
 
Join Date: Oct 2006
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The label is setup to receive 4 lines. I figured out how to group like you said mmcdonal. Thank you :) but that does not completely solve my problem (another one arose in the process). I have labels that are of the dimensions 1"H x 2.5"W. I fit the Device, Type, and one tag and one comm such as:

Device
Type
Tag
Comm

But since some have multiple tags and comm's they need to group together, without repeating the device and type. So ideally I would have two labels (1" x 2.5") - I'll call them sticky labels from here on out - spit out
----------- -------------
| Device | | Tag2 |
| Type | | Comm2 |
| Tag | | Tag3 |
| Comm | | Comm3 |
------------ -------------

whether the sticky labels are in a column or in a row is irrelevant to me, but I need to be able to put them out in that sort of format. As is now, if I don't have a third tag it places the next Device's name there. So I'm trying to find if there's a way to insert a blank space when there is not a tag and put the tag there if there is a tag. If it would be easier to see what I'm talking about, I can send screen shots of the print preview and the design window.
 
Old December 13th, 2006, 02:37 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

You could do this with code and a temporary table, but I am not sure if you want to get into coding this.

You can also use the Can Shrink property. Does that help?


mmcdonal
 
Old December 13th, 2006, 03:45 PM
Authorized User
 
Join Date: Oct 2006
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Not really. I already tried using the shrink property. How would I go about using code and temporary table?
 
Old December 13th, 2006, 03:49 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

It depends on whether you need to code for N number of Tag/Comm per Device/Type, or just 3, as you have in your label structure.

Will there only ever be a maximum of 3 Tag/Comms per Device/Type pair?



mmcdonal
 
Old December 13th, 2006, 03:52 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Also, is there any chance of redesigning this so that the Device and Type are look ups, or are they already?


mmcdonal
 
Old December 13th, 2006, 04:00 PM
Authorized User
 
Join Date: Oct 2006
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No, they're not lookups. I don't know how to do that yet. There's a max of 4 tags/comms per Device/type pair. If there's an easy way to make it a lookup I'd be more than happy to design it that way.
 
Old December 13th, 2006, 04:04 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Yes, if the Device names and Types are unique.

Create a Make Table query just pulling the Device column, set Unique Values to Yes, and create the table.

Then change the field type on the first table to look up have it look up the to the new table.

Do the same with the Type column.

Then the queries get easier.

mmcdonal
 
Old December 13th, 2006, 04:25 PM
Authorized User
 
Join Date: Oct 2006
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Okay. I've created the table with only the Device/Type. I did a lookup and now I'm using Tag as the unique identifier (some tags share comm's) and labled it Tag. I now have a drop down list (combo box) in that table. Does that sound like I did it right? What's the next step?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Grouping with calculated field in report jack123 Access 3 August 9th, 2007 06:46 AM
Grouping - Summing - Report Generation Hylvenir XSLT 3 May 6th, 2006 07:34 AM
Crystal Report Grouping B.V.Madhav Crystal Reports 1 June 6th, 2005 12:21 PM
Grouping Header/Footer in VB 6 Report Design Oyero VB How-To 1 February 18th, 2005 09:29 AM
Page Eject After Grouping Levels Change in Report twsinc Access 0 February 23rd, 2004 01:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.