Forum Discussion
CristinaRSP
Mar 21, 2022Copper Contributor
Combo box
Good day I have a table with data, and I am trying to run a query with the criteria from a combo box.
When I run the query I get no data. I don't know how to figure out what's wrong. Also I don't know how to access my post, as I posted this last week.
Thanks
Cristina
6 Replies
Sort By
- George_HepworthSilver Contributor
I think you can go to your profile and obtain a list of all previous posts you have made, but of all the forums I frequent, this is easily the least intuitive to navigate.
With regard to your question, asking in such generic terms makes it impossible for anyone to guess what the specific problem could be. If you were to offer specifics, such as the SQL of the query (not a screenshot of the query design grid, but the actual SQL) and some sample data that SHOULD return values, maybe someone would then be able to help identify potential reasons for the problem.
- CristinaRSPCopper ContributorThanks for your response.
This is the SQL.
SELECT DISTINCT RTI.[Cause of Accident], RTI.full_name, RTI.sex
FROM RTI
WHERE (((RTI.[Cause of Accident])=[Forms]![Preview Reports]![Combo100]));
I have a table with list of causes of accidents, and a table with Data on crashes.
The query returns no data.
I would be grateful for your assistance.
Cristina- George_HepworthSilver Contributor
What is the rowsource for the combo box, [Forms]![Preview Reports]![Combo100]
And we try to rename controls instead of accepting the default assigned by Access, "Combo100" apparently is based on a lookup table of accident causes, so give it that name: "cboAccidentCause" or similar.
My guess is that there is probably a number field involved, and not just the text field indicated, but we have to see that as well.