Solved

how to generate unique labels

Posted on 2008-10-09
8
691 Views
Last Modified: 2013-11-28
Hi

I designed a database in access and have some items for sale, to register those in my new system i would like to generate labels with unique codes, so i can later scan them  and enter in the system.
Any idea how to generate those labels, which have to be unique, i mean everytime that i need more labels it has to generate different ones.

thanks
0
Comment
Question by:titorober23
  • 4
  • 3
8 Comments
 
LVL 8

Expert Comment

by:Rog
ID: 22680821
You could have a simple table with one column and one row.  

This table would then house the last label (Number) that was used.

Each time you create a label, you increment this number by one and so on.

The table would always hold the last number used.

Rog
0
 

Author Comment

by:titorober23
ID: 22680913
hi
it's confuse
how do i implement this idea
0
 
LVL 8

Expert Comment

by:Rog
ID: 22680944
Ok, easier solution.

You have a table in your database that holds rows of data of each item.

The table (Items) table, should have columns
Description
Price
Entered date.

You can add a column to this table say ID and set the property of the column to be Autonumber.

This will automatically create a unique number for each row in the table and new rows that are added.

Rog
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 22681717
titorober23,

You already have the same question open here:
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Access_Reports/Q_23780010.html

Please do not post duplicate questions.

If you are not getting responses, please click the request Attention button in your original question.
and explain the situation.
Creating a duplicate question simply confuses things here and experts do not know which question you will eventually delete when you get your final answer.

Situations like this are what the "request attention" button is designed to deal with.

So, now, *please* click the request Attention button in your original question, and ask for help in resolving this issue.
;-)

Thanks.

JeffCoachman
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

Author Comment

by:titorober23
ID: 22682102
Hi
I understand adding a new field o that table, but the numbers of records won't grow as fast as the numbers of labels that i want to generate.
i need an example how to generate unique numbers, everytime that i request them.
0
 
LVL 8

Expert Comment

by:Rog
ID: 22682153
You must be printing more labels than items?

You could create a label table.  Have a row for each label you print.  In this table have a column that is set to Autonumber.  WHen you print a label, you can then add a row.  Using the Autonumber field as the label.  

Rog
0
 

Author Comment

by:titorober23
ID: 22682248
I have the same idea, but how do i append n rows to a table everytime that i request n labels
0
 
LVL 8

Accepted Solution

by:
Rog earned 200 total points
ID: 22682318
YOu could write some VBA that could do this for you...

Something like this.

FOr i - 1 to NumberOfLabels
dim rs as recordset
dim labelNum as long
set rs = currentdb.openrecordset("Select top 1 from labelTable order by LabelNum desc")
  labelNum = rs("LabelNum")
  print label
 ' insert new row into table.
  currentdb.execute("Insert into .......")
next
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now