purchaandr
Registered User.
- Local time
- Today, 23:13
- Joined
- Dec 28, 2008
- Messages
- 23
Hey there, having a bit of trouble with the Dlookup function and was wondering if any of the guru's out there could help?? The code which I am using is:
Private Sub Opportunity_Id_AfterUpdate()
Dim OpportunityID As Integer
OpportunityID = [Forms]![frmActivity Add New]![Opportunity ID].Text
txtOpportunity = DLookup("Opportunity Description", "Opportunity", "Id =" & OpportunityID)
End Sub
And the error that this is giving me is:
Runtime Error '3075'
Syntax Error (missing operator) in query expression 'Opportunity Description'.
This seems rather odd as I have used this exact method of Dlookup before in my project and it has worked fine! What am I doing wrong? Is anyone able to help me out???
Cheers, Andrew
Private Sub Opportunity_Id_AfterUpdate()
Dim OpportunityID As Integer
OpportunityID = [Forms]![frmActivity Add New]![Opportunity ID].Text
txtOpportunity = DLookup("Opportunity Description", "Opportunity", "Id =" & OpportunityID)
End Sub
And the error that this is giving me is:
Runtime Error '3075'
Syntax Error (missing operator) in query expression 'Opportunity Description'.
This seems rather odd as I have used this exact method of Dlookup before in my project and it has worked fine! What am I doing wrong? Is anyone able to help me out???
Cheers, Andrew