1. I have done standard queries before (using the wizard), but now need to do one that searches for an entry from the user.
IE..user enters part of a company name or city and the query only selects those companies that meet that criteria.
I guess I'm having trouble figuring out how to create a query based off of a text box or dropdown list.
2. After querying info for number 1, I need to do another query using the ComapnyID based off of the chosen results that will open a new form and fill the info with it.
I'm having trouble here doing queries based off of a field already shown on the screen (CompanyID), as well as the combination of queries and opening forms.
I guess these are both basically the same problems.
3. I see people entering SQL script into MS Access to get what they want. How do I get to this screen?
Can anyone give advice, or a place that will explain this all simply?
I've looked up many places, but the ones I've found only cover the basic queries without using search fields entered by the user.
Create a new form and go to the data tab in the properties
Click the Record Source and then click the ... button after it. It should bring up a query box. Double click the table you want to use and put in the fields that you want to use in the query. In the criteria enter the location on the field that you want to filter by (Drop Down etc) this will be something like
If you want to display lines with only part of the field, say you want to search for Company but only want to type com then:
like "*" & forms!CompanyFrm!CompanyID & "*"
All you have to do is enter a criteria in the ID field and the other field you want to filter by and then you have a filtered form.
Once you have finished it come out of the query builder and add the field to the form in a line
<CompanyID> <CompanyName> <Company Address>
When you open the form now it will filter out on whatever you have filled in on the other forms and put them in lines down the page
To make it look better go into the properties of the page and click the format tab and change the default view to continuous forms.