I have a simple form containing a text box txtSampleGroups and a combo cboUsers. The form is called from another form, frmConfigureSampleGroupsAndUsers. From the passing form I pass the SampleGoupID via OpenArgs. No problem. I am trying to filter the combo box based on the value of the second column of a combo on the passing form, cboSelectSite. So my criteria is Forms!frmConfigureSampleGroupsAndUsers!cboSelectSite.column(1). I am trying to enter the criteria into the query design window and am having NO luck at all. I get no records. I have tried multiple different things.
Right now this is what my query SQL says (built from design view):
SELECT tbl010Users.UserID, [LastName] & ", " & [FirstName] AS UserName, tbl101Locations_Users.LocationID
FROM tbl010Users INNER JOIN tbl101Locations_Users ON tbl010Users.UserID = tbl101Locations_Users.UserID
WHERE (((tbl101Locations_Users.LocationID)=[Forms]![frmConfigureSampleGroupsAndUsers]![cboSelectSite].column(1)))
ORDER BY [LastName] & ", " & [FirstName];
FROM tbl010Users INNER JOIN tbl101Locations_Users ON tbl010Users.UserID = tbl101Locations_Users.UserID
WHERE (((tbl101Locations_Users.LocationID)=[Forms]![frmConfigureSampleGroupsAndUsers]![cboSelectSite].column(1)))
ORDER BY [LastName] & ", " & [FirstName];
I get no results from this query. It works fine if I just manually enter an ID number such as 1 or 2, etc. I have also tried creating a variable, lngLocationID, and setting the variable to cboSelectSite.column(1). the variable gets properly updated, but when I put lngLocationID into the query criteria, again I get nothing.
This seems like it should be pretty simple but I cannot figure it out after hours of trying.
__._,_.___
Posted by: david.pratt@outlook.com
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (1) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
.
__,_._,___
Tidak ada komentar:
Posting Komentar