Moving Entries From One Table To Another
Jun 12, 2006
So I have 2 tables, the first is for "open" orders (where entries get edited changed and deleted), and the Second is for "finished" orders (where once an order is completed it should move from the open orders table to the finshed one where it will no change and will remain for futre reference)
I need help with the transfering part of this problem. I would ideally like to make a form that allows you to pull up the info for the open order then edit it to finally add the finished order to the other table. Im not sure where to start on this one.
View Replies
ADVERTISEMENT
Aug 21, 2006
Hi there,
I have a simple database with a form that displays the contents of a table called Products. I want to be able to delete items from Products but these should be move into ProductsArchive table and I will then create a seperate form to view Products that have now been removed but were once currently live if that makes sense?
I would like to write some code that on the form when the user clicks on the delete button it will just move the data relating to that record into the ProductsArchive table.
Can anyone help?
View 3 Replies
View Related
Feb 21, 2007
Hey guys,
I'm trying to move a group of fields to a new table. I want the data to follow it. Is there an easy way to do this?
View 5 Replies
View Related
Oct 24, 2005
I have a database of assets.
For example a computer will have an asset .
This database will show the asset, where it is, what it is and who its with .
It will display this on a form.
When this asset gets given to someone else i want a button on the form which displays the assets current data to be clicked and for that info to be moved from the asset current table into the asset history table.
any idea what vb code would do this?
View 1 Replies
View Related
Oct 24, 2005
Database is an asset register.
I have a table called assetcurrent
It displays the asset and where it is, who its with and what it is.
I want a button on the form which when clicked will move the record from the table assetcurrent into another table called asset history.
Any ideas?
View 14 Replies
View Related
May 22, 2006
Hello there,
Is it possible somehow to move a record in the same table, to different row (in the form)? Or in other words, is it possible manualy adjust the position of records (rows) in a report?
I have a continuous form, where rows are filled with data (e.g. 10 rows ).Then i have report , which looks the same as form (rows, and their order). But sometimes user wants to move certain position (row) up or down, to be it on top or bottom or two places above, or below etc, of row list....is there any easy way to do it? Like some button press, where you could swap position with next record (next row) .....
Or just delete (everything) and fill again from beginning the way he wants...
Thanks!
View 4 Replies
View Related
Mar 28, 2015
I am currently working on updating a database that I created four years ago for a commission record
there are the tables
table 1:
product ID
Carrier Code
Type
State Available
Updated
table 2:
Product ID
Product name
Sub-name
Street Comp
GA Comp
After refreshing my creation, I realized that Product name and sub-name from table 2 should be going to table 1.. How can I move those two fields from table 2 to table 1 without mess up the data?
View 2 Replies
View Related
Jul 24, 2013
I've got a table tblPatienten, a table tblRechnung and a form frmRechnung.
The primary key in tblPatienten is KundenNummer, the primary key in tblRechnung is RechnungsNummer. The relationship between tblPatienten and tblRechnung is one to many.
Now, every patient (stored in tblPatienten) is allowed to make multiple orders (stored in tblRechnung).
How can I assign each new order entry in frmRechnung to an existing patient in tblPatienten?
View 10 Replies
View Related
Mar 15, 2007
OK guys, ive done some searching and saw some stuff on this, but everytime I try something I get a INVALID SQL error message. So Im hoping you guys can help out cause Im lost right now.
I have a 2 tables, Training and Schedule. Training contains all the employees training records. Schedule is meant to be a temp table where the supervisors can enter the training and then once completed, can check the COMPLETED checkbox and hit the LOAD TO TRAINING RECORD command button and it moves ONLY the files for that trainee (a combo box) with a completed checkmark to the training table.
Ive tried this code sooooooooo many ways and its giving me a headache. My original way didnt work at all (had a lot of Do..Loop and With Statements, and then someone posted something about Archiving which is the code Ive gone off of now). Any help you guys can off would be awesome!
Heres what I got:
Private Sub cmdLoad_Click()
On Error GoTo Err_Load_Record_Click
UploadHistory
Exit_Load_Record_Click:
Exit Sub
Err_Load_Record_Click:
MsgBox Err.Description
Resume Exit_Load_Record_Click
End Sub
Sub UploadHistory()
Dim DB As Database
Dim WS As Workspace 'Current workspace (for transaction).
Dim strSql As String 'Sql Code.
Dim strMsg As String 'MsgBox message.
Dim bInTrans As Boolean 'Flag that transaction is active.
Set DB = CurrentDb()
Set WS = DBEngine(0)
WS.BeginTrans
bInTrans = True
Set DB = WS(0)
On Error GoTo Err_UploadHistory
'Execute the add.
strSql = "INSERT INTO [Training] " _
& "(TaskNumber, Date, Hours, TrainerLast, TraineeLast, Qualified) " _
& "SELECT " & "Schedule.Task, Schedule.Date, Schedule.Hours, Schedule.Trainer, " _
& "Schedule.Trainee, Schedule.Qualified FROM [Schedule] " _
& "WHERE (((Schedule.Trainee) = " & Me.TraineeCombo & " AND (Schedule.Completed)= 1));"
DoCmd.SetWarnings False
DoCmd.RunSQL strSql
DoCmd.SetWarnings True
'Execute the delete.
strSql = "DELETE FROM [Schedule] WHERE Trainee = " & Me.TraineeCombo & " AND Completed = 1;"
DoCmd.SetWarnings False
DoCmd.RunSQL strSql
DoCmd.SetWarnings True
'Get user confirmation to commit the change.
strMsg = "Upload " & DB.RecordsAffected & " record(s) from " & Me.TraineeCombo & "?"
If MsgBox(strMsg, vbOKCancel + vbQuestion, "Confirm") = vbOK Then
WS.CommitTrans
bInTrans = False
End If
Exit_UploadHistory:
'Clean up
On Error Resume Next
Set DB = Nothing
If bInTrans Then 'Rollback if the transaction is active.
WS.Rollback
End If
Set WS = Nothing
Exit Sub
Err_UploadHistory:
MsgBox Err.Description, vbExclamation, "Upload failed: Error " & Err.Number
Resume Exit_UploadHistory
End Sub
View 4 Replies
View Related
Jan 10, 2005
Quick Scenrio:
I have a current employee's table and Retired/Resigned table, when an employee either retires, resigns or gets fired, i want to be able by the click of a switch or check box of some sort to move that record to the retired table. Your input is greatly apprectiated....
Eddie..
View 4 Replies
View Related
Jan 16, 2014
I have to move records from one table to another.
When we lose a client I need to take them out of my current table and put them in my dropped table.
I don't want to lose my summary info and I want the dropped client to keep it's ID Number which is an identifier.
Seems I can't just copy it from one table to another and then go back and delete it from the Current.
Seems I can't cut from Current and paste into Dropped.
In a perfect world it would be great if my boss could just check a box in Current Table and the record moved to Dropped all by itself!
View 7 Replies
View Related
Jul 25, 2013
I created my database a few months ago and split the database into a front and back end. I recently added a new table on the front end. How can I move this table to the back end and re-link it?
View 3 Replies
View Related
Nov 18, 2013
I have one main table with a list of equipment. I have a second table where there will be a form for damage reports.
What is the easiest way to make multiple entries from the second table correspond with a single entry on the main table?
Some equipment pieces might have dozens of damage reports, while some might not have any.
View 1 Replies
View Related
Oct 14, 2005
Hi,
With a table in open view can a record be moved to a different position, i'm using access 2003. Also is there any way to sort besides ascending or descending?
I've got a lot of tables to make and if I forget a single column/field and have to add it later (like I have done all ready numerious times) I'm almost having to recreate the table again in order to have the field fit in the correct spot in the table. These tables are bound to combo boxes so its important every thing is grouped for easy choosing.
Thanks--All help will be very appreciated
View 6 Replies
View Related
Jul 5, 2013
I have two tables;
Parts
Sold Parts
Now what I am trying to get to happen is using a YES/NO box, Say i have a "part" in the parts table when i click the YES/NO box, to have the tick to say it has been sold, I want that line to move to the Sold Parts table. is this even possible?
View 5 Replies
View Related
Jun 20, 2014
I am trying to get a record from tbl_new_accounts to tbl_closed_accounts, based on the number entered in a input box.
Code:
Dim StoreNumber As String
StoreNumber = InputBox("Please Enter The Store Number", "")
CurrentDb.Execute ("INSERT INTO Tbl_Closed_Accounts SELECT Tbl_New_Accounts.* From Tbl_New_Accounts WHERE (((Tbl_New_Accounts.Fld_Store_Number)=" & StoreNumber & "));")
View 1 Replies
View Related
Apr 10, 2012
1st - Table one, holds around 10,000 recordes, names and phone numbers and basic address information
2nd - Table two which holds all out customer details eg full name and case details and is used by an admin team
What I was hoping to do was have one form designed from table one and when the agent changes a status it moves the record from table one to table two.
View 5 Replies
View Related
Sep 25, 2014
The below SQL is basically trying move a record from one table to another, the table a copies of one another and the AlphaName variable is a string.
I keep getting the incomplete query error, somethings missing but what.
Code:
strSQL = "INSERT INTO [Holding Table].* SELECT ([Import Table].* FROM [Import Table]
WHERE ([Import Table].[Alpha Name] = '" & AlphaName & "'));"
View 3 Replies
View Related
Apr 8, 2015
I have a client that is using a split database. I am working on an update to the program and need to transfer a table to the backend that has the correct structure and information included in it. My thoughts are to make a one time use program that transfers the table to the backend. I have seen DoCmd.TransferDatabase and DoCmd.CopyObject as possible ways to go.
View 10 Replies
View Related
Jan 13, 2007
I have a table named tblProduct,
I have a table names tblProductSpec,
tblProduct contains basic info, tblProductSpec contains infomation linked with outer tables. What I need to is have the product ID's duplicated in tblProductSpec. Is it possible to do this via relationships etc?
Any help greatly appreciated. :)
-Adzi
View 3 Replies
View Related
Jan 26, 2006
Hello,
I have a table which identifies my database users with the following fields:
INITIALS
USER
TITLE
I than have another table named MASTER with two fields named USER and TITLE. The field user, get it's data from the first table INITIALS. I would like that the field TITLE would be updated with the users TITLE once it is entered.
I know how to do this with a form (I place in a txt box =[USER].[Column](2) but have noticed that it only displays the info but not actually stores it into the field.
Is there a way I can do this directly from the table so that I can remove the TITLE control from my form? Thanks.
View 1 Replies
View Related
Oct 23, 2006
I have a table 'project'. I want that the number of records in this table should not exceed 20. How can I code this is my code? And how do I set it in the 'table design'?
View 2 Replies
View Related
Mar 13, 2014
I have a table in access which is updated weekly; I need to create two tables from this updated table.
1st table will consist of all the new entries for the current week
2nd table will consist of all the entries from the previous week - an amalgamation of all the entries which are not from the "current week" (table) For example; the table below shows the two entries from last week.
ID
Name
1
Adam
2
Ben
This week I have three new entries New entries
ID
Name
3
Charles
4
Richard
So when I run the same query next week I will get something like this.
Old Entries
ID
Name
1
Adam
2
Ben
3
Charles
4
Richard
[code]....
How do I get a query /queries which divides up the weeks new entries and also all the old entries.
View 11 Replies
View Related
Aug 16, 2015
I found the attached example a while back (can't find the site again though ) and it calculates a moving average. I've hacked out the parts I need for my own work and I can create my moving average query without an issue.
However, I need to extract the MA data into a table so planned on using append. I kept getting type errors so I tried make table to see what type it was creating and it appears to be Short Text rather than a number.
I've added an extra button and Make Table query to the example.
As far as I can tell from the code, the moving average value when calculated is a Single. However, when I write it to the table, its a Short Text.
How do I make the created Table use Number Type for my calculated moving average?
Using Access 2013
View 2 Replies
View Related
May 13, 2005
Hey all,
I'm having a horrible time trying to get this to work. Basically, I have a database which has multiple tables. All of my tables are being generated with a CREATE TABLE statement. What I would like to do is add a validation rule or something else upon creation so that only X number of entries can be entered into the table.
Initially, I just added a rule that said id<5 or whatever manually to the table in order to restrict the number of entries, but I can't figure out how to do this automatically in my SQL statement or Visual basic. I want to be able to have this check added upon table creation. Surely what I'm doing must be possible.
Am I going about it the wrong way? Any Help would be appreciated. Thanks!
View 3 Replies
View Related
Feb 15, 2006
Hi All,
I am wanting to build a table which consists of all the queries and tables in the database.
I am expecting column 1 to have all the queries and column 2 to contain all the tables that make up the query. So the table will look like this:
Queries - Linked Tables
Query1 - Table1
Query2 - Table1
Query2 - Table2
Query3 - Table1
Query3 - Table4
As you can see a table can be linked to any number of tables.
Now for my actual question. I don't want to have to type in all the queries and tables. I would like to choose any query and table from a drop down of all possible queries and tables that are currently in the database - like a list, where the list contains all the possible values.
I would then select the relevant entry.
Any pointers would be great.
Thanks,
Evan
View 2 Replies
View Related