Hello Access gurus,
I need help writing a short macro that converts multiple selections from a listbox to query criteria. The form is SystemHistory, my query is System_Query, and my report is SystemsReport. The input for System Code is on the Systems Table. Use 314 for test purposes.
Mechanical.zip
I found several sources online about this issue, but cannot get them to work with my form SystemHistory. My cmdOK button was setup with the macro builder, and I do not know how to make the button do all the things I need.
1) Close report SystemsReport (if the report was open before)
2) Open report SystemsReport with refreshed criteria from form. (I figured just refreshing the report wasn't what I wanted because I want the report "front and center" after clicking OK. If there is a better way to accomplish this then please let me know)
3) Convert selections in listbox CatList to query criteria for query System_Query. The query field is the last one added "Category"
Sites I found that I could not get to work:
http://access.mvps.org/access/forms/frm0007.htm
http://support.microsoft.com/kb/135546
I appreciate any help.
Thanks,
Raul