Adding a barcode to a new Record

  • Thread starter Thread starter Mike Faulkner
  • Start date Start date
M

Mike Faulkner

Hello

OS: Windows XP
App: Access 2003
2 Tables: A & B

Using VBA I want to:
1. Import a new product into Table B
2. Add the next unused barcode from Table A

Any suggestions on how to write item 2, using VBA, would be much appreciated.

Regards
Mike Faulkner
 
The simplist thing to do to use barcodes is to let the barcode represent the
primary key (autonumber. When this is done, a new product will always be
assigned an unique barcode. Will this work for you?

Steve
(e-mail address removed)
 
Hello

Thanks for the reply.

Table A: Barcode numbers [EAN] that have been bought.
Table B: New products

When a new product is added to Table B I want to allocate it (using VBA) the
next free Barcode.

Auto number method requires a 'Compact and Repair' before Autonumber resets
to 1.

Regards
Mike
 
Mike,

In Table A is the a Yes/No field to show which numbers have been used? And
is there field such as Autonumber to determine which is the next unused one?

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Mike Faulkner said:
Hello

Thanks for the reply.

Table A: Barcode numbers [EAN] that have been bought.
Table B: New products

When a new product is added to Table B I want to allocate it (using VBA)
the
next free Barcode.

Auto number method requires a 'Compact and Repair' before Autonumber
resets
to 1.

Regards
Mike

Gina Whipp said:
Mike,

How are you determining the next Barcode? Why wouldn't that field be in
TableB?

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm




.
 
Back
Top