I am running the following code in a form. It fires on the lost focus event of the field called "PNAdd" and is supposed to grab and retain "Part Description". It does not work, can you see anything wrong with this code?
Private Sub PNAdd_LostFocus()
Dim dbs As Database
Dim rst As Recordset
Dim strSQL As String
Dim strOpenArgs As String
Set dbs = CurrentDb
strOpenArgs = Me![PNAdd]
strSQL = "SELECT [Part Description] from T_PartsMaster WHERE PN = '" & strOpenArgs & "'"
Set rst = dbs.OpenRecordset(strSQL)
rst.MoveFirst
'strV = rst![Part Description]
'Form_F_PNAdd.Description = strVDesc
Description = rst![Part Description]
rst.Close
dbs.Close
End Sub