473,503 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I combine an append and update query with user supplied info?

12 New Member
I'm trying to make a query in Access 2007 to append a record in one table to another table and include a bit of user-supplied information.

Let's say there are two tables: TableA and TableB.
TableA looks like: [ID|Name|Email|LoginID]
TableB looks like: [ID|Name|Email|LoginID|TermTicket]
TermTicket is supplied by the user, ID is taken from the form for the specific record

Right now I have an append query to copy the table info then an update query to add in the TermTicket. Is there any way to combine the 2 into one command? Would it be easy to put the info for TableA into an array for a given ID, add the TermTicket info, then copy the array to TableB?

I'm just trying to minimize update/append queries
Feb 1 '11 #1
3 2054
Rabbit
12,516 Recognized Expert Moderator MVP
If ID is supplied by the form for the insert then have the form supply term ticket as well. Althought the real question is why do you have two identical tables where the only difference is a column.
Feb 1 '11 #2
Erik Pygott
12 New Member
It's a bit complicated, but basically TableA is active users of an application and TableB is disabled users. When a user is disabled the LoginID in TableA is reused, but the record needs to be saved for auditing, so it gets copied to TableB with the termination ticket, then Name and Email are cleared in TableA so the LoginID can be reused. Someone using the database will find the active user needing to be disabled, click a button to set off the process. The button prompts the user to enter the termination ticket, then does all the automation
Feb 2 '11 #3
Rabbit
12,516 Recognized Expert Moderator MVP
Then you already have everything you need to combine the two queries into a single insert query.
Feb 2 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
5770
by: JMCN | last post by:
hi i need some advice on whether if it would be better to use an append query or an update query. here is the situation, i have linked another database table to my current database. then i...
1
1690
by: cong ngo | last post by:
Hi all If have table with the records below and these data need to be update to another table by the name field. name phone fax emal ted 619 mary 855
1
1573
by: Melepoil | last post by:
Hi All, I have a query to get selected fields from two tables in an SQl server. I made a make query table to get these data to a table. Whenever there is a change in the databse (the...
6
7879
by: Greg Strong | last post by:
Hello All, In an 'Update' query can you use user-defined functions in the 'Update To' for the query? Either no or I'm missing something. See the additional info below. If I run a query...
3
5116
by: Greg Strong | last post by:
Hello All, Is the only solution to an update query which requires the records in a certain order to dump the records into a temp table in the required order, then do the update query? I've...
6
5004
by: Dixie | last post by:
I have asked this question before, but I could not get the suggested solution work. So I will give more details this time. I have an append query that adds several hundred records to a table...
2
1603
by: atiq | last post by:
why isn't my Access giving me warning before runing the delete, append or update query because usually it warns you that you are about to append, update or delete the following number of records. It...
12
1850
by: praveenkrg | last post by:
my update query is not working properly! $mgroupname=$_GET; //echo $mgroupname; ///query for checking userg_id $result=mysql_query("SELECT * FROM group WHERE userg_name ='$mgroupname'");...
4
2391
by: dougmeece | last post by:
Morning Everyone... I have a table that needs to be append to and also updated. All the fields in the table are populated with data from the text boxes and combo boxes on a form. The Date...
4
7761
by: hapnendad | last post by:
In the question statement below Field names are in and variables are in (). All fields referenced are in what I have named the ‘PAR’ Table. Using MS Access 2003, I am working on a project...
0
7083
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7456
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3166
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1510
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.