Results 1 to 7 of 7
  1. #1
    kchadek is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    6

    Need Help Printing Labels for a Specified Record

    Hello,

    I'm new to the forum and relatively new to Access (all self-taught as I go). Hopefully you guys can help out with this one.

    I am looking to set up a database where I have a table of records that correspond labels to product numbers. The product numbers may have anywhere from 1 to 30 labels that correspond to them, and I want the user to have a form where they search by a product number and then the labels that correspond to that product number are printed out on an Avery label.

    Here is how the main data table will look: (everything is simply arbitrary to illustrate)
    Click image for larger version. 

Name:	Main Data.JPG 
Views:	14 
Size:	24.4 KB 
ID:	17472

    For example: If I type in "1111" into the form - the labels that print would be AA, AB, AC, AD, & AE

    I know how to set up labels to print using forms, but the only way I can think of this working is by looking up the product number in the table, then copying the row of labels into another table (let's call it "labels to print") and pasting them in a column, then printing to the labels, and clearing the "labels to print" table for the next time.


    Is this the correct route to go? If so, how do I go about looking up the product number in the main table and copy them to the "labels to print table".



    Any help is greatly appreciated. Thanks!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    49,548
    You could have another table with normalized records. Fields would be: ID, ProductNum, Label. There would be multiple records for each ProductNum.

    An alternative to another table and to prevent having to do code that writes to a 'temp' table is a UNION query. A UNION manipulates the data into a normalized structure. Use the UNION query like a table (except can't edit data) as source for other queries.

    There is no wizard or designer for UNION, must type or copy/paste in SQL view of query builder. For some reason, I cannot type UNION in the example query. Replace ______ with UNION.

    SELECT ID, [Product Number], 1 AS LabelID, [Label 1] AS Label FROM tablename
    ______ SELECT ID, [Product Number], 2, [Label 2] FROM tablename
    ______ SELECT ID, [Product Number], 3, [Label 3] FROM tablename
    ______ SELECT ID, [Product Number], 4, [Label 4] FROM tablename
    ______ SELECT ID, [Product Number], 5, [Label 5] FROM tablename;
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    kchadek is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    6
    I guess I'm not understanding how UNION would help with this. Isn't a UNION for combining 2 queries?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    49,548
    Not necessarily. It can be used as I describe to rearrange the data of a non-normalized table into normalized structure. If I understand your label printing requirement, you need the data in normalized structure.

    Did you try the query? Can't hurt.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    kchadek is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    6
    Yes! Your idea did work.

    I then have made a separate query to filter out labels per the input on the form.

    Now I am having trouble printing to labels. I need to print a label from the above query.

    I have a continuous label that is 3 across (as many down as need be) and the labels are only .5"x1". I can get it to work fine with a standard sheet feed, but continuous just messes up the formatting and only one of the labels show up in print preview.

    Any ideas about this?

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    49,548
    Small label.

    What do you mean by continuous? The paper stock is continuous (perforated)?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    kchadek is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    6
    June 7, I am printing from a Zebra printer that is fed with a row of labels.

    I have since figured out that issue though, Thanks for your help!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 08-29-2013, 02:36 PM
  2. Eliminating blank lines when printing labels
    By tomcoll in forum Reports
    Replies: 12
    Last Post: 11-16-2011, 07:50 PM
  3. Trouble printing labels (data from Access) in Word
    By Austruck in forum Import/Export Data
    Replies: 2
    Last Post: 08-08-2011, 10:23 AM
  4. Printing Labels.
    By Robeen in forum Reports
    Replies: 1
    Last Post: 05-02-2011, 05:32 PM
  5. Replies: 10
    Last Post: 11-23-2010, 10:16 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums - Senior Forums