B
bluezcruizer
Hi.
I'm horrible with Access code and hoping you can help me. Here's what I
have and what I'm looking for:
I've got two tables in my db. One is the main table, the second table is
for the purposes of a lookup table. I'm not sure how I'm going to piece this
together just yet, so there's no relationships set at this time.
My data is an Excel spreadsheet with about 12-15 different fields. I'm
importing the data into my main spreadsheet. One of the fields that's being
imported is the corresponding state of the specific record. Example: record
1 has the state NY, record 2 the state ME, etc.
In my second table I've got 3 fields: one is the primary key via autocount.
The second field is the state abbreviations (text; limited to 2 characters,
no duplicates allowed). The third field is a rep name field, also text.
What I'd like to do is have Access lookup the state in the second table and
return the corresponding rep of that state and put it in the main table, and
I'd like this to happen during or immediately after the import of data.
I thought it may be perhaps an afterupdate code, but I'm not sure. What do
I have to do to make this work (or can it be done), and where would the
relationship be built from the primary table; the state field, or the rep
field?
Thanks all!
bluezcruizer
I'm horrible with Access code and hoping you can help me. Here's what I
have and what I'm looking for:
I've got two tables in my db. One is the main table, the second table is
for the purposes of a lookup table. I'm not sure how I'm going to piece this
together just yet, so there's no relationships set at this time.
My data is an Excel spreadsheet with about 12-15 different fields. I'm
importing the data into my main spreadsheet. One of the fields that's being
imported is the corresponding state of the specific record. Example: record
1 has the state NY, record 2 the state ME, etc.
In my second table I've got 3 fields: one is the primary key via autocount.
The second field is the state abbreviations (text; limited to 2 characters,
no duplicates allowed). The third field is a rep name field, also text.
What I'd like to do is have Access lookup the state in the second table and
return the corresponding rep of that state and put it in the main table, and
I'd like this to happen during or immediately after the import of data.
I thought it may be perhaps an afterupdate code, but I'm not sure. What do
I have to do to make this work (or can it be done), and where would the
relationship be built from the primary table; the state field, or the rep
field?
Thanks all!
bluezcruizer