I have an syntax error, missing operatior in the following code:
Dim StrSQL As String
StrSQL = " DLookUp('[items2]','[products]','[ProductID]=' & [ProductID])"
Me!Stueck.ControlSource = StrSQL
Dim StrSQL As String
StrSQL = "[red][b]=[/b][/red]DLookUp('[items2]','[products]','[ProductID]=' & [ProductID])"
Me!Stueck.ControlSource = StrSQL
I don't know why you are using code rather than just setting the control source to:
=DLookUp("[items2]","[products]","[ProductID]=" & [ProductID])
This assumes ProductID is numeric.
Also, why would you not have the Products table in the report's record source query joined to the ProductID in one of your current tables. Then just add the Items2 field to the Record Source fields?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.