A
AccessUser777
Hi all,
I'm needing some assistance in making this DLookUp function work for me. I
have two tables (tblReship and dbo_dailyrecords). I built a form based on
tblReships but I need to populate some fields on the form with data from
dbo_dailyrecords. I looked at this site and got some coding on using the
DLookUp function and below is the code I'm using:
Private Sub TaskID_AfterUpdate()
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("SELECT*From dbo.dailyrecords WHERE
ORIGINALTASKID=" & Me.TaskID)
If Not (rst.EOF And rst.BOF) Then
'/now populate the textboxes
Me.CallDate = rst("Date_Created")
End If
Set rst = Nothing
End Sub
When I enter a task id (textbox) I get an error message:
Run Time Error '3024'
What am I missing in the code? Any help/suggestion/advice would be greatly
appreciated. Thanks
I'm needing some assistance in making this DLookUp function work for me. I
have two tables (tblReship and dbo_dailyrecords). I built a form based on
tblReships but I need to populate some fields on the form with data from
dbo_dailyrecords. I looked at this site and got some coding on using the
DLookUp function and below is the code I'm using:
Private Sub TaskID_AfterUpdate()
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("SELECT*From dbo.dailyrecords WHERE
ORIGINALTASKID=" & Me.TaskID)
If Not (rst.EOF And rst.BOF) Then
'/now populate the textboxes
Me.CallDate = rst("Date_Created")
End If
Set rst = Nothing
End Sub
When I enter a task id (textbox) I get an error message:
Run Time Error '3024'
What am I missing in the code? Any help/suggestion/advice would be greatly
appreciated. Thanks