By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,961 Members | 1,332 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,961 IT Pros & Developers. It's quick & easy.

Need some help

P: 2
I am creating an inventory database where I need to import data from a text file created by a barcode scanner. The software associated with the scanner saves scanner data as a text file that looks something like this:

1234561235
12335
12365
45645
1234567895
12398
45659
4567890123
12397

The 10 digit codes are the barcodes for the location where the equipment is. The following 5 digit codes are the barcodes of the equipment in the location scanned above.
I would like to set up an import parent child relationship so that the equipment is associated with the location. I have limited access/coding experience but I pick things up quickly. I realize this could get complicated, quick.
Let me know if you guys have any ideas.

Much thanks,
SSgt Jonathan Glass
USAF
May 14 '07 #1
Share this Question
Share on Google+
2 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
This question has been posted in the articles section. I am moving it to the Access forum.

ADMIN
May 14 '07 #2

NeoPa
Expert Mod 15k+
P: 31,344
As the data for the two tables is stored together, but on separate lines, this will not be too straightforward. The only way that I can see to handle this would be :
  1. Define an import table (tblImport) with the one (text) field but with enough characters to handle either field.
  2. Define two other tables :
    1. tblLocation - which simply has the ten char primary key (Location).
    2. tblEquipment - which has both a Location field and an Equipment field.
  3. Write some code to :
    1. Clear the current data in the tblImport table.
    2. Import the new data into tblImport.
    3. Loop through the data remembering whatever is the latest Location and writing the data to both tables where appropriate (A Location line would be written to tblLocation, but an Equipment line would be written, with the most recent Location data, to tblEquipment).
May 14 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.