Passing multiple parameters to a form
Thank you for taking the time to report an issue.
What's wrong... Please write below.
The main problem is, I do not know the number of parameters I will need to pass into to the query before I run the file (but I could potentially know this number before I run the query). Because of this, I cannot hardcode ?'s into my query and pass the corresponding number of parameters.
The number of parameters I am passing depends on a file searched earlier in my code. So, I could have anywhere from one to hundreds of parameters.
One away around this problem is to call individual queries for each parameter, and compile a table based on each item returned. I would rather not do this because I want to make use of SQL’s ORDER BY function, which I know is more efficient than sorting a table using C# code after I have called the queries.
I am using Access 2003
When the user enters in parameters and hits Ok, the intended form pulls up, but only the tab of the form. but with blank fields which would tell the user that the parameters were wrong.
If there a way the parameter form show a error message or something if the parameters entered by the user are not found? Probably in VBA I am assuming.
Or it would even be helpful to get the form to at least open, but as of right now the form leaves the user stuck.
How do I create a sort of "dialog" box that allows the user to enter multiple parameters all at once.
I have parameters supplied in query 1, and parameters defined in both query 1 and cross tab query.
I am returning a boolean value from my VB function which works fine but I also need to return a long value. I am trying to do this in the normal ByRef way but constantly get back nothing. I have debugged my VB function and the value is available and is propagated in the ByRef parameter but I cannot use this in my ASP page.
I've also added a run button to the form that runs the query (I eventually plan to have it run the report but I thought I would get the query to work first). The end userwill define the desired parameters on the form (note that they may choose some or all of the parameters).
When I bring up the form, it seems to run the query without any parameters (it pulls all the records in the table). I don't want it to run the query until the user inputs the parameters. After you input some of the parameters and hit the run button, the query results pop up showing all the records in the table. It seems as if the query didn't recognize the parameters.
I have written queries and reports before where a box pops up for each parameter. Do I somehow need to tell the query to get the parameters from the form? I've also built forms before butthey were designed to input data directly in to tables.
The report comes up without any data . It only shows the labels.