Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 10th, 2006, 10:05 PM
MN
Guest
 
Posts: n/a
Default assign number from table to record on import and creation

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.
  #2  
Old August 11th, 2006, 03:45 AM
pietlinden@hotmail.com
Guest
 
Posts: n/a
Default Re: assign number from table to record on import and creation

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.

  #3  
Old August 11th, 2006, 03:55 AM
Lyle Fairfield
Guest
 
Posts: n/a
Default Re: assign number from table to record on import and creation

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

--
Lyle Fairfield
  #4  
Old August 11th, 2006, 10:35 AM
pietlinden@hotmail.com
Guest
 
Posts: n/a
Default Re: assign number from table to record on import and creation


Lyle Fairfield wrote:
Quote:
MN <mn@mn.mn.invalidwrote in news:mn-2CE353.17162410082006
@news.giganews.com:
>
Quote:
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.

  #5  
Old August 11th, 2006, 07:55 PM
John Vinson
Guest
 
Posts: n/a
Default Re: assign number from table to record on import and creation

On Thu, 10 Aug 2006 17:16:24 -0400, MN <mn@mn.mn.invalidwrote:
Quote:
>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]
  #6  
Old August 11th, 2006, 10:05 PM
MN
Guest
 
Posts: n/a
Default Re: assign number from table to record on import and creation

In article <arkpd29014a0103ujhcubhq5bdapkpci65@4ax.com>,
John Vinson <jvinson@STOP_SPAM.WysardOfInfo.comwrote:
Quote:
On Thu, 10 Aug 2006 17:16:24 -0400, MN <mn@mn.mn.invalidwrote:
>
Quote:
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.
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles