Adding a barcode to a new Record

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
 
S

Steve

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)
 
M

Mike Faulkner

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
 
G

Gina Whipp

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




.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top