A
Andy
Hi there,
I have a main form and a subform, I trying a code in subform as below and
found a run-time error#3464 on the line of "Set rst =
db.OpenRecordset(strSQL)"
I am appreciate for your help in advance!!!!!
Private Sub LABOUR_NO_AfterUpdate()
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim strSQL As String
Set db = CurrentDb
strSQL = "SELECT * from [LABOUR TABLE] WHERE [LABOUR NO]=" & Me![labour no]
Set rst = db.OpenRecordset(strSQL)
Me![SALARY] = rst![DAILY SALARY]
rst.Close
End Sub
I have a main form and a subform, I trying a code in subform as below and
found a run-time error#3464 on the line of "Set rst =
db.OpenRecordset(strSQL)"
I am appreciate for your help in advance!!!!!
Private Sub LABOUR_NO_AfterUpdate()
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim strSQL As String
Set db = CurrentDb
strSQL = "SELECT * from [LABOUR TABLE] WHERE [LABOUR NO]=" & Me![labour no]
Set rst = db.OpenRecordset(strSQL)
Me![SALARY] = rst![DAILY SALARY]
rst.Close
End Sub