change quantity to rows

p0welly

Registered User.
Local time
Today, 02:53
Joined
Aug 26, 2004
Messages
38
Im integrating a Scanpal Batch barcode scanner into my application, and need a little help with my label printing facility.

at the moment the scanner imports a list of barcodes and quantitys this is merged with my product table and results in a table something like this:

barcode | Description | price | quantity
123456 | my stuff | 9.99 | 7

i need a query to move this to my label printing however my print queue works like this

barcode | Description | price
123456 | my stuff | 9.99
123456 | my stuff | 9.99
123456 | my stuff | 9.99
123456 | my stuff | 9.99
123456 | my stuff | 9.99
123456 | my stuff | 9.99
123456 | my stuff | 9.99

can a query do this?

Thanks
 
Looks you you need to have a look at the relationship you have with in your query, if you have duplicates this is one reason?

Alastair
 
my mistake, i must not have explained my self clearly, rather than having one item with a quantity of 7 I want 7 items with a quantity of 1
 
I'm not sure you can do it with a query but I know you can do it with a RecordSet and some code.
 
RuralGuy said:
I'm not sure you can do it with a query but I know you can do it with a RecordSet and some code.

Yes I agree with this, a VBA recordset is definitely the way to acheive what you want.

Here is a page showing some recordset functionality

http://allenbrowne.com/ser-29.html

You should be able to use the movenext function ;)
 

Users who are viewing this thread

Back
Top Bottom