yep, copy this and save it
--------------------------------------------
for Access 2000 databases
--------------------------------------------
Dim Conn2 As ADODB.Connection
Dim Rs1 As ADODB.Recordset
Dim SQLCode As String
Set Conn2 = CurrentProject.Connection ' <<<<Note same as CurrentDb
Set Rs1 = New ADODB.Recordset
SQLCode = "SELECT * FROM [STOCK CODE LOOKUP] WHERE STOCK_CODE = '" & Me![Part Number] & "';"
Rs1.Open SQLCode, Conn2, adOpenStatic, adLockOptimistic
Note: do normal rs1! or rs1. stuff from now on
like Rs1!fieldname
Rs1.addnew
' close it this way
Set rs1 = nothing
Set Conn2 = nothing
If you don't close it you will get an error when you try to reopen it.
Its not like DAO which closes things for you.
DougP, MCP
Visit my WEB site
to see how Bar-codes can help you be more productive