I am trying to create a search from a form but am having trouble getting data returned.
- I have a combo box, CboTitle Search that I select the criteria from.
- I have a search button, cmdSearch, that is looking through a query of submitted work when clicked.
- I want to compare what is selected in the combo box to the rows in the query and pull all the data in the query for the titles that match.
- I have tried creating a separate query for this process and using the OnClick Event Procedure to run it but I am not getting any results.
[SQL Query CODE]
[CODE=SQL]SELECT Created_Submitt ed_Query.Title, Created_Submitt ed_Query.[Year Created], Created_Submitt ed_Query.Submit ted, Created_Submitt ed_Query.[Submitted To], Created_Submitt ed_Query.Websit e, Created_Submitt ed_Query.Accept ed, Created_Submitt ed_Query.Date, Created_Submitt ed_Query.Type
FROM Created_Submitt ed_Query
WHERE ((([Forms]![Records_Search]![CboTitleSearch])=[Created_Submitt ed_Query].[Title]))
GROUP BY Created_Submitt ed_Query.Title, Created_Submitt ed_Query.[Year Created], Created_Submitt ed_Query.Submit ted, Created_Submitt ed_Query.[Submitted To], Created_Submitt ed_Query.Websit e, Created_Submitt ed_Query.Accept ed, Created_Submitt ed_Query.Date, Created_Submitt ed_Query.Type;[/CODE]
[SQL Query CODE]
Ultimately I would like to have the results appear as a sub-form on the bottom half of my search form instead of opening another screen. However, I can fight that battle later if necessary.
Unfortunately for me I am not a programmer and am just trying to teach myself how to do some things. Any help on this would be greatly appreciated.
Thanks,
Doug
- I have a combo box, CboTitle Search that I select the criteria from.
- I have a search button, cmdSearch, that is looking through a query of submitted work when clicked.
- I want to compare what is selected in the combo box to the rows in the query and pull all the data in the query for the titles that match.
- I have tried creating a separate query for this process and using the OnClick Event Procedure to run it but I am not getting any results.
[SQL Query CODE]
[CODE=SQL]SELECT Created_Submitt ed_Query.Title, Created_Submitt ed_Query.[Year Created], Created_Submitt ed_Query.Submit ted, Created_Submitt ed_Query.[Submitted To], Created_Submitt ed_Query.Websit e, Created_Submitt ed_Query.Accept ed, Created_Submitt ed_Query.Date, Created_Submitt ed_Query.Type
FROM Created_Submitt ed_Query
WHERE ((([Forms]![Records_Search]![CboTitleSearch])=[Created_Submitt ed_Query].[Title]))
GROUP BY Created_Submitt ed_Query.Title, Created_Submitt ed_Query.[Year Created], Created_Submitt ed_Query.Submit ted, Created_Submitt ed_Query.[Submitted To], Created_Submitt ed_Query.Websit e, Created_Submitt ed_Query.Accept ed, Created_Submitt ed_Query.Date, Created_Submitt ed_Query.Type;[/CODE]
[SQL Query CODE]
Ultimately I would like to have the results appear as a sub-form on the bottom half of my search form instead of opening another screen. However, I can fight that battle later if necessary.
Unfortunately for me I am not a programmer and am just trying to teach myself how to do some things. Any help on this would be greatly appreciated.
Thanks,
Doug
Comment