Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying ID into new table

Status
Not open for further replies.

Smeg77

Technical User
Oct 7, 2009
18
GB
I have a simple DB with three tables, two of them I have linked together, one for Workers and one for Equipment.

I've created a third table to record any equipment that gets stolen.

To try and keep things simple I want to take the ID from the Worker Table and Use it as the ID for the Stolen table.

I currently have the following ID fields in the Stolen Table

ID (Autonumber0
Stolen_ID (number)

In my form I'm using a Combo Box to list the names of all the workers from the Worker Table, and what I'm trying to do is be able to select the Worker name and then have it's ID recorded in the Stolen Table.

I'm currently using this Query;

Code:
Dim L As Recordset

Set L = Me.RecordsetClone
L.FindFirst "[tblWorkers]![ID] = " & Me![Combo_Stolen]
Me.Bookmark = L.Bookmark
Me![Combo_Area] = Null


End Sub

But I keep getting a 3021 error message, I'm sure there's a simple solution to this, so I'd be greatful for anyhelp.
 
Just noticed I was in the wrong forum section.

Can a mod please move this to the Microsoft: Access Section please (if possible)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top