473,322 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

assign number from table to record on import and creation

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
5 2578
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
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

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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Vishal Sinha | last post by:
Here is my issue. I have a list of merchants (generated daily) and I need to assign them eually to a set of analysts. Both the merchant list and analyst list can change daily. I want to assign each...
14
by: amywolfie | last post by:
Hi All: I know this is simple, but I just can't seem to get there: I need to sort a table by a text field (txtDescription), then assign sequential numbers to the field SEQUENCE in table. ...
2
by: Megan | last post by:
Hi everybody- I have 2 tables, Hearings and Rulings. Both have primary keys called, CaseID, that are autonumbers. I don't want both tables to have the same autonumber. For example, if Hearings...
0
by: DataFreakFromUtah | last post by:
Hello! No question here, just a procedure for the archive. Search critera: count records imported count data imported count number of rows imported count number of records imported record import...
2
by: MLH | last post by:
Gentlemen: I have declared an array Dim MyTables(14) AS Long Now I want to assign values for MyTables(0) - MyTables(14) equal to the number of records in each table. Catch, I want the code...
7
by: astro | last post by:
Anyone have suggestions on where to troubleshoot this error? Background: -Access 2k v. 9.0.6926 sp3 - front and backend on production server (wiindows 2k) -accessed via Citrix -front-end is...
2
by: dskillingstad | last post by:
I'm trying to assign a custom value to a textbox. Here's what I have. I've created a module and "default value" code for a textbox which generates a custom auto-number (yyyy-0000) when a New...
20
by: keri | last post by:
Hi, I am creating a table where I want to use the date as the primary key - and to automatically create a record for each working date (eg Mon to Fri) until 30 June 2007. Is this possible? I do...
2
by: argniw | last post by:
I need to assign a different random number to each record in one column in one table in access. How can i do this?
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.