Topics Search

Passing multiple parameters to a form

Passing multiple parameters to a form
Views: 371
We can use the OpenArgs method to pass a parameter to another form. We can also pass multiple parameters to another form using this method, and the following tutorial details how to perform this task.
Sponsored Links:

Similar posts...

 

Passing Multiple Parameters to Access Database

Passing Multiple Parameters to Access Database Icon
I have had a lot of trouble passing multiple parameters from Microsoft Visual Studio 2010 to a query on a Microsoft Access 2010 database. I am coding in C# in Visual Studio. After hours ofsearching,

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.
 

multiple input parameters on a form

multiple input parameters on a form Icon
I have 4 input parameters on a form, and want the user to be able to enter none, any, or all. I am trying to then build a single query to use whatever parameters they entered (or did not enter) instead of the separate queries in a conditional macro as I have now.

I am using Access 2003
 

Parameters used in multiple queries

Parameters used in multiple queries Icon
I need to build multiple queries and they will all be ran inside of a macro. Several of the queries have dates that I will have user entered parameters each time the query runs. Is there away that I can set up parameters where the user enters them in once and every query that uses dates will use those parameters? Currently, my queries are set-up as simple parameter querieswith this in the date field criteria.
 

Show error message after query with bad parameters

Show error message after query with bad parameters Icon
I have a couple queries that accept their parameters from forms. I have one form with three options, one of which is autofilled, one date picker, and on field the user enters.

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.
 

Make dialog box to enter multiple parameters at once

Make dialog box to enter multiple parameters at once Icon
I have a report which shows shipping information and currently has a form which outputs the data based on what dates you enter into the form. However, there are certain parts of the report that need information for a different date.

How do I create a sort of "dialog" box that allows the user to enter multiple parameters all at once.
 

Crosstab Query Keeps Prompting for Parameters, Even after they're entered

Crosstab Query Keeps Prompting for Parameters, Even after they're entered Icon
I have two queries. The first, is a query that pulls data and gets it's parameters (client, begin date, end date) from controls on a form. The second, is a crosstab query based on query 1. Even after I supply the parameters via form (which doesn't close so I know that isn't the issue) the query will run but then ask for parameters again? If I hit cancel on the parameter dialogquery runs like normal.

I have parameters supplied in query 1, and parameters defined in both query 1 and cross tab query.
 

Passing parameters byref from VB to ASP

Passing parameters byref from VB to ASP Icon
Is anyone aware of any limitations in passing values 'ByRef' from a VB COM component to ASP.
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.
 

Designing a customizable report creator using forms & queries

Designing a customizable report creator using forms & queries Icon
I am trying to create a form that will populate parameters in a query and output the results as a printable report. I have created the query and the form that displays all the parameters in the query.

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.
 

Form to supply parameters to a report

Form to supply parameters to a report Icon
I have created a form to supply parameters to a report. Once I open the report access opens a form that serves to collect the parameters. I enter the parameters and than access is to retrieve the information.

The report comes up without any data . It only shows the labels.
 

Passing Parameters to a Query Without Parameter Prompts

Passing Parameters to a Query Without Parameter Prompts Icon
I have a query that requires a parameter to work. I need to pass a form field (entered by the user) to the query as the parameter, but I don't want the parameter box to pop-up asking the user for input when the button is clicked to run the parameter.

I tried using DoCmd.RunSQL, but, if I understand correctly, this can't be used for a select statement. I used it with updating and inserting with no problems.

I'm trying to use qdf.Parameters() now, but I still get the popup. Is there a way to pass parameter without the parameter prompts?