thewrightdesign
Registered User.
- Local time
- Today, 11:13
- Joined
- Sep 30, 2010
- Messages
- 85
Thought I would start a new thread for this one even though I'm building off the last issue.
I have a single table db that now has a search form to find any combination of Institution, Pass/fail status, and begin and end dates. I am needing to now add in searches for some of the testing results. Three fields (R, M, and L) and I need to be able to search for below 8.0, 8.0 and above, and 10.0 and above on all three fields. Currently the query code looks like this:
SELECT GEDdata.[DOC#], GEDdata.Lastname, GEDdata.Firstname, GEDdata.Institution, GEDdata.ResultDate, GEDdata.PASS, GEDdata.Score, GEDdata.LAW, GEDdata.SS, GEDdata.SC, GEDdata.LAR, GEDdata.MAT, GEDdata.R, GEDdata.M, GEDdata.L, GEDdata.PLAW, GEDdata.PSS, GEDdata.PSC, GEDdata.PLAR, GEDdata.PMAT, GEDdata.PTOTAL
FROM GEDdata
WHERE ((Institution=Forms!SearchForm!cboInstitution Or Forms!SearchForm!cboInstitution Is Null) And
(PASS=Forms!SearchForm!cboPass Or Forms!SearchForm!cboPass Is Null) And
(ResultDate Between Nz(Forms!SearchForm!txtStart,Forms!SearchForm!txtAltStart) And Nz(Forms!SearchForm!txtEnd,Forms!SearchForm!txtAltEnd)));
Not really sure how to proceed to get the conditional statements added to this code. Do I simply do combo boxes like I did for institution and pass/fail and if so how do I code them to take more than an exact match of what is input?
I have a single table db that now has a search form to find any combination of Institution, Pass/fail status, and begin and end dates. I am needing to now add in searches for some of the testing results. Three fields (R, M, and L) and I need to be able to search for below 8.0, 8.0 and above, and 10.0 and above on all three fields. Currently the query code looks like this:
SELECT GEDdata.[DOC#], GEDdata.Lastname, GEDdata.Firstname, GEDdata.Institution, GEDdata.ResultDate, GEDdata.PASS, GEDdata.Score, GEDdata.LAW, GEDdata.SS, GEDdata.SC, GEDdata.LAR, GEDdata.MAT, GEDdata.R, GEDdata.M, GEDdata.L, GEDdata.PLAW, GEDdata.PSS, GEDdata.PSC, GEDdata.PLAR, GEDdata.PMAT, GEDdata.PTOTAL
FROM GEDdata
WHERE ((Institution=Forms!SearchForm!cboInstitution Or Forms!SearchForm!cboInstitution Is Null) And
(PASS=Forms!SearchForm!cboPass Or Forms!SearchForm!cboPass Is Null) And
(ResultDate Between Nz(Forms!SearchForm!txtStart,Forms!SearchForm!txtAltStart) And Nz(Forms!SearchForm!txtEnd,Forms!SearchForm!txtAltEnd)));
Not really sure how to proceed to get the conditional statements added to this code. Do I simply do combo boxes like I did for institution and pass/fail and if so how do I code them to take more than an exact match of what is input?
Last edited: