When I double click on a record within my data sub sheet form a duplicate record is created. Access seems to allocate a new (auto number) for the key of the new record. I need to get hold of that key for the newly created record. In order that I can connect table units to another related table.
Private Sub unitKey_DblClick(Cancel As Integer)
sSQL = "INSERT INTO units(unit)" & _
" VALUES('" & unit & "');"
DoCmd.RunSQL sSQL
End Sub
Private Sub unitKey_DblClick(Cancel As Integer)
sSQL = "INSERT INTO units(unit)" & _
" VALUES('" & unit & "');"
DoCmd.RunSQL sSQL
End Sub