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

assign number from table to record on import and creation

P: n/a
MN
Hello,

I have a customer table and another table that I need to prepopulate
with special customer IDs, unique and not sequential. Is there a way to
configure Access to assign the customer ID to every record each time
that a record is either created for the first time or imported for the
first time? I would be importing into a temp table and then running an
update query to copy the data to the customer table. Another confusing
issue is that I will be updating the customer table through an update
query occasionally to just update existing customer data -- I don't want
that process to trigger issuing a new customer ID. Any thoughts?

Thanks.
Aug 10 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
select a random set of customer records? Forget the technical part of
this. Explain what you want in plain old English. If you knew how to
do it, you wouldn't be posting. So just explain (1) what you have
(give an example record if necessary), and (2) what you want to happen
or the outcome you want.

If you run an update on the customer table, you won't create new IDs.
Where did you get the notion an update query would update anything but
the fields specified in the query?

If you want a random autonumber assigned to a record, create an
autonumber field in your final table and set the type or whatever to
Random instead of Increment.

Aug 11 '06 #2

P: n/a
MN <mn@mn.mn.invalidwrote in news:mn-2CE353.17162410082006
@news.giganews.com:
Any thoughts?
There But for the Grace of God go I.

--
Lyle Fairfield
Aug 11 '06 #3

P: n/a

Lyle Fairfield wrote:
MN <mn@mn.mn.invalidwrote in news:mn-2CE353.17162410082006
@news.giganews.com:
Any thoughts?

There But for the Grace of God go I.
Do you mean "only God can understand what that was about"? That's
certainly what I thought, but then I'm a mental midget.

Aug 11 '06 #4

P: n/a
On Thu, 10 Aug 2006 17:16:24 -0400, MN <mn@mn.mn.invalidwrote:
>Hello,

I have a customer table and another table that I need to prepopulate
with special customer IDs, unique and not sequential. Is there a way to
configure Access to assign the customer ID to every record each time
that a record is either created for the first time or imported for the
first time? I would be importing into a temp table and then running an
update query to copy the data to the customer table. Another confusing
issue is that I will be updating the customer table through an update
query occasionally to just update existing customer data -- I don't want
that process to trigger issuing a new customer ID. Any thoughts?

Thanks.
I'm trying to imagine WHY you would need to create a table with a
bunch of empty "placeholder" records with nothing but an ID. What's
the point? How is storing this redundant information of use?

John W. Vinson[MVP]
Aug 11 '06 #5

P: n/a
MN
In article <ar********************************@4ax.com>,
John Vinson <jvinson@STOP_SPAM.WysardOfInfo.comwrote:
On Thu, 10 Aug 2006 17:16:24 -0400, MN <mn@mn.mn.invalidwrote:
Hello,

I have a customer table and another table that I need to prepopulate
with special customer IDs, unique and not sequential. Is there a way to
configure Access to assign the customer ID to every record each time
that a record is either created for the first time or imported for the
first time? I would be importing into a temp table and then running an
update query to copy the data to the customer table. Another confusing
issue is that I will be updating the customer table through an update
query occasionally to just update existing customer data -- I don't want
that process to trigger issuing a new customer ID. Any thoughts?

Thanks.

I'm trying to imagine WHY you would need to create a table with a
bunch of empty "placeholder" records with nothing but an ID. What's
the point? How is storing this redundant information of use?

John W. Vinson[MVP]
It's a school ID system. On a daily basis we import data via flat file
from an enterprise system. We need a way to assign a 16 digit number to
each imported record at the time of import. That 16 digit number is a
unique identifier and ends up encoded on their ID card. This is the
table structure that we are looking at:

Table 1: Customer table
school ID number
last name
first name
status
etc ...

Table 2: 16 digit numbers
16 digit number
assigned? yes or no

We need a way to automatically have Access assign a 16 digit number to
each record in the customer table at import or record creation and then
mark that number as assigned so it won't be issued again. The key part
is that we need the number to be grabbed from a pool of available
numbers that were provided to us (15 digits, sequential one after
another, plus a check digit, which makes the 16 digit number
non-sequential).

I realize this is complicated but I appreciate any recommendations.

Thanks.
Aug 11 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.