A
Alan48
Private Sub Lot_No_AfterUpdate()
Dim db As Database, rst As Recordset
Set db = CurrentDb
Set rst = db.OpenRecordset("SELECT * FROM tlbReceiving WHERE Lot_No = " &
Me![Lot_No])
With rst
Me![Rcv_Date] = !Rcv_Date
End With
End Sub
When i run the program, the SQLstr is work , but the code run to
"Me![Rcv_Date] = !Rcv_Date" , it prompt error '2113' , 'you input the value
is invalid in this field'.
But [tlbReceiving][Rcv_Date] has data in that table. Actually, i want the
sql check if passed. The related field data from tlbReceiving will pass a
data to this form field (Me![Rcv_Date]). and the form name call frmDelivery.
Do you know what is the problem. and hope you can help me to solve this
program. thank you all of you.
Dim db As Database, rst As Recordset
Set db = CurrentDb
Set rst = db.OpenRecordset("SELECT * FROM tlbReceiving WHERE Lot_No = " &
Me![Lot_No])
With rst
Me![Rcv_Date] = !Rcv_Date
End With
End Sub
When i run the program, the SQLstr is work , but the code run to
"Me![Rcv_Date] = !Rcv_Date" , it prompt error '2113' , 'you input the value
is invalid in this field'.
But [tlbReceiving][Rcv_Date] has data in that table. Actually, i want the
sql check if passed. The related field data from tlbReceiving will pass a
data to this form field (Me![Rcv_Date]). and the form name call frmDelivery.
Do you know what is the problem. and hope you can help me to solve this
program. thank you all of you.