Copy One Field Data To Another Table Field

rlm

Retired Navy Veteran
Local time
Today, 12:02
Joined
Nov 25, 2011
Messages
18
I'm super new at this and this question probably seems extremely simple to most but I've tried the Append Query and it wants to append all records.
I have and Assets Table which has an AssetID field and I want to Copy the current record field data to my TasksHistory Table and put it into the current Asset ID field. Seems simple but it's stumping me right now. Example: Asset Table: AssetID=1 and I want that AssetID=1 to be placed in the TaskHistory Table: Asset ID field. I hope this example is understandable. Help is really needed.:rolleyes:
 
Here's a tip on building append queries. First start by building a select query that selects the data you wish to append to your new table. Once you are happy that it is selecting only the data you wish, convert it to an Append query.
 
How do you tell the Select Query Condition to only look at the current record.
 
Sorry it didn't work. Still wants to look at all the records and I only want it to look at the current record. How do I have it accomplish that?
 
How do you tell the Select Query Condition to only look at the current record.

If you want to only select the current record on the form use cirteria in the form;
Code:
[Forms]![YourFormNameHere]![YourControlNameHere]
This would be in the Criteria section of your query under the Field that relates to YourControlName.
 
Still didn't work. Just wondering if I do this from within a Macro
 
Still didn't work. Wants to append 64 records instead of just carrying over just the field data. So lets try a different way. I'm trying to open a table called "Tasks History" and create a new record. I'm wanting to bring over the [AssetID] from a table called "Assets" and place it into a field within "Tasks History" called [Asset ID]. Then open a form called "Tasks Sign Off Form-One Time" for adding data.
Can all this be done within VBA Code?:confused:
 
Are you able to post a copy of your DB? '07 or earlier for preference.
 
How do you post a copy of the DB?
 
Still didn't work. Wants to append 64 records instead of just carrying over just the field data. So lets try a different way. I'm trying to open a table called "Tasks History" and create a new record. I'm wanting to bring over the [AssetID] from a table called "Assets" and place it into a field within "Tasks History" called [Asset ID]. Then open a form called "Tasks Sign Off Form-One Time" for adding data.
Can all this be done within VBA Code?:confused:

How are Tasks History and the Assests tables related, what is the common ID between these records? Or to put it another way, how do you know which record in Tasks History should get a specific Asset ID number?
 
How do you post a copy of the DB?
First up do a Compact and Repair on your DB, then put it in a Zip file. Then the next time you post use the Paper Clip icon at the top of your posting window to upload the Zip file with your post.
 
The relationship is: Table "Assets" = [Asset ID} and Table "Task History" = [AssetID]. When I create a new record within "Task History" and edit the data with a Form called: "Task Sign Off Form-One Time" I want the [Asset ID] from the previous Form called: "Asset Form" to be copied to the newly created record with "Task History" and be displayed with the Form called "Task Sign Off Form-One Time". This seems to be so simple but it's definitely kicking my gluteus maximus .
 
If the structure of your Database was correct then you would not have to do this.

Suggest you go back to basics.
 

Users who are viewing this thread

Back
Top Bottom