Make inventory labels?

  • Thread starter Thread starter Sue
  • Start date Start date
S

Sue

I had a wild idea, and maybe someone out there can tell me
if this is possible, and if so, how to do it. I need to
make several hundred inventory labels, starting with the
number 00001. I know there is a way to do sequential
numbering through Access, and I had the idea that I could
use this method to automatically print out a label report
that would number labels from 00001 through whatever
number I decide is enough. It would sure beat typing out
every label. If this is not possible, my next thought is
to try a mail merge from Excel into Word. But Access
would be very easy if it is possible. Thanks in advance
for any ideas!
 
The easiest method might be to create a table of numbers [tblNums] with a
single field [Num] and values 1 through whatever large number you need. Add
this table to your report's record source and add the Num field to the grid.
Set the criteria under the Num column to <= the quantity you want to print.
In the report, you can format the Num field to display 00001 or whatever.
 
Thanks for the response, Duane. I was trying to avoid
having to type in several hundred numbers. Is there a way
to have Access generate the numbers, then format them
with the leading zeros?

Sue
-----Original Message-----
The easiest method might be to create a table of numbers [tblNums] with a
single field [Num] and values 1 through whatever large number you need. Add
this table to your report's record source and add the Num field to the grid.
Set the criteria under the Num column to <= the quantity you want to print.
In the report, you can format the Num field to display 00001 or whatever.

--
Duane Hookom
MS Access MVP


I had a wild idea, and maybe someone out there can tell me
if this is possible, and if so, how to do it. I need to
make several hundred inventory labels, starting with the
number 00001. I know there is a way to do sequential
numbering through Access, and I had the idea that I could
use this method to automatically print out a label report
that would number labels from 00001 through whatever
number I decide is enough. It would sure beat typing out
every label. If this is not possible, my next thought is
to try a mail merge from Excel into Word. But Access
would be very easy if it is possible. Thanks in advance
for any ideas!


.
 
Hmmm..just had a thought. I could generate the numbers
through Excel (Adding 1 to previous cell then dragging
downward) then export the data to Access. Then I could
use the rest of your method to do the report.
-----Original Message-----
The easiest method might be to create a table of numbers [tblNums] with a
single field [Num] and values 1 through whatever large number you need. Add
this table to your report's record source and add the Num field to the grid.
Set the criteria under the Num column to <= the quantity you want to print.
In the report, you can format the Num field to display 00001 or whatever.

--
Duane Hookom
MS Access MVP


I had a wild idea, and maybe someone out there can tell me
if this is possible, and if so, how to do it. I need to
make several hundred inventory labels, starting with the
number 00001. I know there is a way to do sequential
numbering through Access, and I had the idea that I could
use this method to automatically print out a label report
that would number labels from 00001 through whatever
number I decide is enough. It would sure beat typing out
every label. If this is not possible, my next thought is
to try a mail merge from Excel into Word. But Access
would be very easy if it is possible. Thanks in advance
for any ideas!


.
 
Hmmm..just had a thought. I could generate the numbers
through Excel (Adding 1 to previous cell then dragging
downward) then export the data to Access. Then I could
use the rest of your method to do the report.
-----Original Message-----
The easiest method might be to create a table of numbers [tblNums] with a
single field [Num] and values 1 through whatever large number you need. Add
this table to your report's record source and add the Num field to the grid.
Set the criteria under the Num column to <= the quantity you want to print.
In the report, you can format the Num field to display 00001 or whatever.

--
Duane Hookom
MS Access MVP


I had a wild idea, and maybe someone out there can tell me
if this is possible, and if so, how to do it. I need to
make several hundred inventory labels, starting with the
number 00001. I know there is a way to do sequential
numbering through Access, and I had the idea that I could
use this method to automatically print out a label report
that would number labels from 00001 through whatever
number I decide is enough. It would sure beat typing out
every label. If this is not possible, my next thought is
to try a mail merge from Excel into Word. But Access
would be very easy if it is possible. Thanks in advance
for any ideas!


.

You don't need to do that.

Create a new table named "tblOfNumbers"
with just one field, named ANumber, with a Number datatype, Integer
9or Long Integer) field size, Indexed(No Duplicates)

Place this procedure in a module, then run it.

Public Sub FillATable()
' Will fill a table field with incremented numbers
Dim Db As Database
Dim rs As Recordset
Dim lgCounter As Long
Dim intStart As Integer
Dim intEnd As Integer

Set Db = CurrentDb
Set rs = Db.OpenRecordset("tblOfNumbers", dbOpenDynaset)

On Error Resume Next

intStart = InputBox("From?", "Start with #", 1)
intEnd = InputBox("To?", "End with #", 1000)
For lgCounter = intStart To intEnd
With rs
.AddNew
![ANumber] = lgCounter
.Update
End With
Next lgCounter
rs.Close
Set rs = Nothing
Set Db = Nothing

End Sub
==========
Enter the starting and ending numbers when prompted.
 
Back
Top