A
Alan48
Private Sub Lot_No_AfterUpdate()
'declare variables
Dim dbObject As Connection
Dim rst As Recordset
'set database
Set dbObject = CurrentProject.Connection
'set recordset
Set rst = dbObject.Execute _
("SELECT Lot_No FROM tlbReceiving " & _
"= " & Me![Lot_No])
With rst
Me![Rcv Date] = ![Rcv Date]
Me![Item No] = ![Item No]
End With
End Sub
But it prompt ".Execute" has problem. Would you help me thanks.
'declare variables
Dim dbObject As Connection
Dim rst As Recordset
'set database
Set dbObject = CurrentProject.Connection
'set recordset
Set rst = dbObject.Execute _
("SELECT Lot_No FROM tlbReceiving " & _
"= " & Me![Lot_No])
With rst
Me![Rcv Date] = ![Rcv Date]
Me![Item No] = ![Item No]
End With
End Sub
But it prompt ".Execute" has problem. Would you help me thanks.