I have tried to apply this code to a button as an 'On Click' Event. But I keep getting an error message saying it expect an end statement. The code works if I run it through a regular query but I want to be able to manulipulate the data more easily with a combo box.
ProductList.RowScouce =
SELECT AddressDirectoryT.AddressID, IndividualxGroupT.GroupID, IIf([FirstName],[FirstName] & " " & [LastName],[CompanyName]) AS Contact FROM AddressDirectoryT INNER JOIN IndividualxGroupT ON[ AddressDirectoryT.AddressID = IndividualxGroupT.AddressID];
End Sub
Jim O
Reply from Richard Rost:
It's probably the bracketing of your join field names. You'd need brackets around EACH field. Also, if possible, I don't like to put functions in my SQL statements. Almost always better to create a helper query with the function then use THAT query for your SQL statement data source.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access SQL Seminar Part 1.