chaostheory
Registered User.
- Local time
- Today, 05:22
- Joined
- Sep 30, 2008
- Messages
- 69
Well i am creating a form of standard queries that people will run so they aren't actually in the database and can't change anything.
All the queries i have created so far worked fine.
I create a query
I create a simple form. Label, text box and a button
I link the source of the form to the query
I link the field i want to search in the crosstab query to the txtbox in the form like so:
Like "*" & [Forms]![frmLookupPPbyStrNumber]![txtLookupStrNumber] & "*"
With the other forms it works perfectly...it opens the form i type in a number and hit search and i get results.
With the crosstab query, it is popping up a parameter box everytime i run the query, before it opens the form. It still works, but i can't get that stinking parameter box to go away.
Also note with the crosstab i had to enter a parameter under the query menu for that query, i didn't have to do this on any other ones.
If i dont enter the parameter under Query i simply get an error.
Is there an easy way i can use VBA to do this instead of using parameters and all that. All of my vba experience is with Excel.
For instance can i simply put code on the button that when clicked, stores the data in the text box then runs the query using that data? rather than dealing with linking sources, creating parameters and all that hooplah?
All the queries i have created so far worked fine.
I create a query
I create a simple form. Label, text box and a button
I link the source of the form to the query
I link the field i want to search in the crosstab query to the txtbox in the form like so:
Like "*" & [Forms]![frmLookupPPbyStrNumber]![txtLookupStrNumber] & "*"
With the other forms it works perfectly...it opens the form i type in a number and hit search and i get results.
With the crosstab query, it is popping up a parameter box everytime i run the query, before it opens the form. It still works, but i can't get that stinking parameter box to go away.
Also note with the crosstab i had to enter a parameter under the query menu for that query, i didn't have to do this on any other ones.
If i dont enter the parameter under Query i simply get an error.
Is there an easy way i can use VBA to do this instead of using parameters and all that. All of my vba experience is with Excel.
For instance can i simply put code on the button that when clicked, stores the data in the text box then runs the query using that data? rather than dealing with linking sources, creating parameters and all that hooplah?