|
 |
access thread: Updating a table filed based on another
Message #1 by "Kristine Anderson" <kristinework@h...> on Thu, 26 Jul 2001 15:08:02
|
|
I have a table in Access, and I want to be able to take the value of the
primary key field (which is an auto number) and copy it into another field
automatically (a text field).
The reason is, I have some ASP code I am using to delete records through a
Web browser. It all works except it won't let me delete based on the
userID field. It is not an accepted datatype for what I'm doing because it
is an auto number. In my database, the userID field is the only one that
will always be unique, so I need to be able to delete based on that field.
My ASP code only accepts text fields.
So, is there a way for my table to check the userID field when a new
record is added and copy that value to another field? I have tried many
things with the default value property to no avail.
Thanks for your help!
Message #2 by "Yehuda Rosenblum" <Yehuda@I...> on Thu, 26 Jul 2001 10:10:52 -0400
|
|
How about a SQL query like this (after adding a new blank column):
UPDATE table_name SET new_column = auto_id
-----Original Message-----
From: Kristine Anderson [mailto:kristinework@h...]
Sent: Thursday, July 26, 2001 11:08 AM
To: Access
Subject: [access] Updating a table filed based on another
I have a table in Access, and I want to be able to take the value of the
primary key field (which is an auto number) and copy it into another
field
automatically (a text field).
The reason is, I have some ASP code I am using to delete records through
a
Web browser. It all works except it won't let me delete based on the
userID field. It is not an accepted datatype for what I'm doing because
it
is an auto number. In my database, the userID field is the only one that
will always be unique, so I need to be able to delete based on that
field.
My ASP code only accepts text fields.
So, is there a way for my table to check the userID field when a new
record is added and copy that value to another field? I have tried many
things with the default value property to no avail.
Thanks for your help!
|
|
 |