Queries :: Query Parameter Input On A Form (combo Box)

Jul 15, 2014

I have a table which holds information on audits that have been carried out on staff member's actions. The 'Supervisor' field is populated via a combo box which is linked to a separate table (tblSupervisors).

I am now trying to build a query to allow me to extract all audits that have been carried out on a specific supervisor - rather than the criteria to be [Enter Supervisor Name] and allowing text entry, I thought it would be better to have form that pops up with a combo box that is used to select the supervisor (from tblSupervisors);

So far:

- Form "Supervisor_Select" is created, and has a combo box that looks up from tblSupervisors

- Macros as specified in the instructions are created (Open Dialog, Close Dialog, OK and Cancel)

- Query is done, all bar the criteria expression on the desired field.

- Module is created as described in the instructions, and is called "Supervisor_Select"

I have tried putting the following in the criteria;

[Forms]![Supervisor_Select]![cboSupervisor], however I think I am missing the bit where the query opens the "Supervisor_Select" form?? Will this only work from a button where the on click event runs the 'Open Dialog' macro and then runs the query?

View Replies


ADVERTISEMENT

Get Input For Parameter Query From A Form

Jul 23, 2006

I am not a programmer and I don't know VBA/VB.
I am using this as a workaround to avoid VBA functions (since I don't know them).
I can't seem to find a simple? solution to this.
I have a query that does a radial search in decimal degrees. I have created an unbound form as a dialogue box that converts degrees-minutes-seconds to decimal degrees and displays the results in a calculated text box. What I want to do is have the query take the results in the calculated text box as its parameters (along with a third parameter- distance) without prompting the user. How do I get the query to take its results from the fields on the form? I have tried Like [Forms]![frmName]![SearchValue], but I can't seem to make it work.

View 2 Replies View Related

Queries :: Combo Box Query Parameter

Aug 27, 2013

I have a query where I want to use a combo box in the parameter. However, its not working.

SELECT Call_Details.Emp_ID, Call_Details.[Call Status]
FROM Call_Details
WHERE (((Call_Details.Emp_ID)=[Forms]![TTY_ID]![TTY_ID]));

I get this in the Parameter Value Dialoge

Forms!TTY_ID!TTY_ID

Should I be entering this in the criteria field at all? Do I have to build an event to make this work?

View 3 Replies View Related

Queries :: How To Use Combo Box For Query Parameter

Oct 30, 2013

I need to apply a parameter to a query based on from combo box. I have added the ALL option to the combobox which that the user would select if they want to run the query to show all records;

E.g. Selecting ALL Countries would be the same as having no parameter or a wild card *

ALL Countries
UK
United States
Asia
Europe

I tried an iif statement like:

IIf([forms]![frmSelectReports].[location]="AllCountries",like"*",[forms]![frmSelectReports].[location])

but it didn't work...

View 2 Replies View Related

Queries :: Using Combo Box To Input Criteria Into Query

Jul 26, 2013

I have a customers list that i am always ading to .I need to run a query to see what individual customers have ordered .

I have the query that works great when i manually insert the customers Surname .but i want the combo to do this job .Is it possible ,or should i be doing something different .

View 1 Replies View Related

Queries :: Parameter Not Getting Passed From Combo Box To A Query

Jan 29, 2015

I am new to access. I have created a form in which I used a combo to show Main Area Name. this value is passed into a query to show only area under main area only. Created another combo to activate the query to show the area.

View 6 Replies View Related

Queries :: Input In Enter Parameter Value Pop Up Box

Mar 13, 2013

Every time I run a query that I have created it asks me to input Expr1 and Expr2 in an enter perameter value pop up box. I don't enter anything, just click okay and the query runs as expected.

Is there a way to get rid of these? (and maybe more importantly, why do they appear?)

View 8 Replies View Related

Query With Combo On Form For Parameter

Dec 15, 2007

I have a report query that uses a combo box on a form to collect the parameters. I would like to be able to include an option that would be like not having any criteria at all, to show all the records. I have tried several combinations in the criteria to get it to work and haven't found a way yet.

IIf([Forms]![MyForm]![Mycbo]<0,Like"*",[Forms]![MyForm]![Mycbo])

I have tried various different versions of what you see above and none have worked. The true part and the false part both work if separated and tested. Is it possible to make this work or is there better way to do this?

View 2 Replies View Related

Forms :: Parameter Query Using A Combo Box In A Form

Apr 23, 2013

I have a form with a main form and a subform, main form's function is to filter the data's inside the sub form using a combo box, right now I have one combo box which filters the data according to their control no so the output if I use say CtrlNo 1 in the combo box the data that will reflect in the subform would be the data's of CtrlNo 1 but now I'm planning to add another combo box that will filter who supplied that CtrlNo.

What I did is I used the same method from my first form that filters the CtrlNo but in this form I replaced the CtrlNo combo box to Supplier Combo box it worked great but now what it made me think is it possible to put this two filters in just one form?combo box 1 is for CtrlNo combo box 2 is for Supplier.

When I tried to create this it failed, when I filtered only the CtrlNo subform doesn't reflect any data this goes the same for the Supplier combo box but when I tried to choose a filter for both combo box say CtrlNo 1 and its Supplier this works fine but what I want is to have both filters to work even if I did not use both parameters is there any way to achieve this?

View 2 Replies View Related

Queries :: Parameter Drop Down To Save User Input In Full Domain Field Name?

Oct 14, 2013

I have created a query with the parameter for the Domain field. however on the form the user enters this information via a drop down menu. i was just wondering could the parameter box be set to a drop down box as well to save the user entering in the full Domain field name?

View 6 Replies View Related

Queries :: One Parameter Form For Several Query

Jul 9, 2014

I have always used parameter forms for inputing query/report criteria. However, they have always been for one query or report. However, all searches I have done for trying to use one form for several queries all I find is a simple response of "Create a form and then direct all the queries to grab the parameter from the form.". Sounds simple enough but I can never get it to work.

I have created a macro that runs 12 Append queries. I have also created a parameter form that has an unbound combo box. The combo box is fed by a query that gathers all the Data Dates for the user to select from. So if there are 24 different data dates then the combo box displays them all.

I tried creating a macro that first opens the form then opens the query, however, it runs the query before I can finish entering the criteria in the form. Then I just get a pop up of "You are about to append 0 records..."I have found several walk-throughs for having a query use a form to grab parameter, but have not been able to find one that shows you how to set up one form to run several queries.

I keep trying to find an answer, then give up and continue manually entering 12 dates for 12 queries when they pop up after running the macro. Now I need to create a macro that runs 24 queries and I don't want to have to go through 24 parameter pop-ups.

View 5 Replies View Related

Queries :: Form Input Not Being Recognized By Query

Jul 10, 2013

I maintain a grade book application that uses many queries whose results are determined by "school year". Most of these are reports and I have a combo box on the Print form for that allows the user to select the school year. The criteria field of the several queries derived by school year is:

[Forms]![Main Navigation]![Print Form]![SchoolYear]
SchoolYear being the combo box control.

They work fine.

I have now added a function to export data to Excel. This is done in a VBA module and I am using a query to select data for the record set I use to write to Excel:

Set objRst = Application.CurrentDb.OpenRecordset(strQueryName)

When I hard code the school year in the query criteria field (i.e. "2012-2013") the process works fine, but if I revert the query to point to the print form field as above, I get an empty recordset.

The Excel export is executed from a control on the Print Form, so the form is open and the combo has data showing, just as it is when a report is run whose data is derived from a query.

When I execute the query from the VBA module, the query is not getting the school year selected on the Print form passed to it properly.

View 7 Replies View Related

Wildcard Query With User Input Parameter Not Working

Jul 12, 2007

I'm using an Excel spreadsheet that is importing external data from an access database in which I've got a field where the name of a person checking materials out is entered. it is currently set up, and I cannot change it, as a free form field. So folks enter information in a variety of ways.

For example, Larry Martin might be entered as "Larry Martin" or "Martin, Larry" or "larry.martin@somewhere.com". I'm trying to run a query that would look in that field for any entry with the string I enter, such as "Martin."

I've tried setting the criteria like this:

Like "*" & [Which Last Name] & "*"

However, when I try and run the query I get a message telling me the system is expecting two parameters.

Does anyone have any idea what I'm doing wrong? I've been banging my head against this for awhile now and am thoroughly stumped! All assistance, as usual, is greatly appreciated!

View 1 Replies View Related

Parameter (Date) Query To Get Input Dates On Report?

Apr 28, 2006

I have a report that has an underlying query that asks for Start Date and End Date.

Is there anyway that I can get what the user inputs into the box to be put into the Page header of the report?

ie: user enters into the parameters
[Start Date] 01/01/2006
[End Date] 04/04/2006

Then when the report displays it says

Report for the period 01/01/2006 to 04/04/2006

Thank you for your time

View 4 Replies View Related

Queries :: Parameter Query Using Form To Collect Data

Jun 24, 2015

I have a parameter query using a form to collect the data. I put LIKE and wildcard enclosing the parameter to bypass the criteria if the data box is empty. It works well. I have another parameter of date type that uses between two dates. How can I bypass the criteria if I leave the data boxes blank?

View 8 Replies View Related

Queries :: Parameter In Query By Two Separate Form Field

Oct 31, 2013

I want to set parameter in my select query with or function as in detail.i have two form with same field

1-with field A
2-With Field A

now i want to select data for a table .with a parameter select with Field A in form 1 or Field A in Form 2.How can i do it

View 5 Replies View Related

Queries :: Form Still Prompts For Parameter After Query Deleted?

May 15, 2013

I had created a query that I was attempting to reference a text field in a form that was open when the query is run. It wasn't working and whenever I opened the form it would prompt for the parameter before opening the form.

I ended up deleting the query to try again from scratch. But the form still asks for the parameters whenever I open the form. Why is Access still prompting me for the parameters?

View 14 Replies View Related

Queries :: Using Input From A Form As Criteria - Error When Running Report / Query

Aug 18, 2015

I have a query that uses the input from a form as criteria, which is then used in a report. The form input is a drop down based on another table. This is a sales pipeline report, and the list is a list of sales people. The report works perfect for all sales people except one. When I run it for the one, I get the following error:

"This expression is is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables".

I DO NOT get the same error when running the query by itself - so assuming there is something in the report causing this. I do have some sum formulas in the report.

Again, no other salespersons selected cause this error -- so I am assuming there is something in the dataset for this person that is causing the error.

View 8 Replies View Related

Queries :: Form To Select Parameter - Causing New Field In Query Design

Jun 16, 2015

I have a query with multiple fields that is being run off of 3 parameters (linked for selection in a form). The problem is, I wanted to enable a select all feature, so I included a "Or ... Is Null" part in my criteria section, so that when nothing is selected, the query/report returns all records.

Okay so the problem is whenever I run the query with nothing selected for the parameter and then return to design view for the query, a new field has been created in the query design, titled with the expression I use to pull the parameter value from the form. This is frustrating because then that is causing errors in another report I run that pulls values from that query.

View 1 Replies View Related

Parameter Query - Combo Box?

Feb 26, 2008

Is it possible, when using a parameter query to make the message box that appears asking for the parameters be a combo box to reduce the chances of the user misspelling something?

Thanks

View 3 Replies View Related

Queries :: Filter Data From A Table Using Query (from Data Input Form)

Dec 30, 2014

I would like to filter data from a table using a query (from an data input form). The objective is to output all results if input form field is empty and to output results higher or equal to the type in the field if field is not Null. The query code is as follows:

IIf(IsNull([Forms]![Form2]![MaxDiffInput]);[Maximum operational pressure (bar)];[Maximum operational pressure (bar)]>=[Forms]![Form2]![MaxDiffInput])

However, is not providing any result when the input field (MaxDiffInput) as a value.

View 5 Replies View Related

Forms :: Using Combo Box Parameter Query

Apr 17, 2013

I encountered an error with my form when I used a combo box to get the set of data that I need. the combo box is from the look up value from a table, then I made a main form and attached a subform which is made from a query, after I put them together the form looks great not until I switch to another supplier or click refresh to get the new data.

One of my record is mixing to another supplier and when I checked the table where the data is recorded it was also change, so if I use this form and clicked on supplier1 the data is good, then switch to supplier2 and then click refresh or if I alt tabbed the data is there and its supplier is also changed.

I tried to delete it and retyped it but still the error sticks, also I tried to delete it permanently but still one of the data is mixing on a different supplier and its supplier in the main table is also changed. I'm using access 2007 and also a friend of mine tested it in access 2010 but the output is different it reflects the correct data.

View 2 Replies View Related

General :: Create Input Form From Combo Selection?

Jan 15, 2013

I have table(fruit) with 5 fields - apples, pears, grapes, oranges and lemons.

Say i have a shopping list apples -5, grapes -6 and lemons -2.How do i get this into the table.

My idea have combo box that you can select the apples, grapes and lemons from.

Have input form

label(apples) input(5)
label(grapes) input(6)
label(lemons) input(2)

how can i do this.

View 7 Replies View Related

Forms :: Adding Combo Box To A Form Depending On Input Values

Sep 23, 2014

I want to add a combo box to a form, where depending on the values entered in the box another combo box would show more values. In other words, if the first combobox had choices of 1, 2, 3 and 4, if 1 was selected the next combo box would have values a, b, c and d. If 2 was selected, it would have values of a, d, e, f and g.

View 2 Replies View Related

Populate Table With Input From Form With Combo Box (multiple Fields)

Feb 21, 2011

I am using Access 2007 and have reviewed many blogs and looked at the Northwind db to try to solve this problem. I would like to create a form that functions in the same manner as the "Order Details" form in the Northwind db. Specifically, I want to create a form that will allow me to input a value and have the form get data from another table and populate the table I need populated.

I would like to populate a table "Outside", field names are Key, Name, term, Value, Date.

The table that contains the data is named "CV" and the filed names are Key, Name.

In the form, I would like to enter a value for Key into a combo box, and have it put the value for Key and for Name into the form, and allow me to enter whatever I want to in the Term, Value and Date field. When I tab out, I would like all this data to be in the table "Outside.

View 8 Replies View Related

1 Parameter Controlled By Multple Combo Boxes On A Form

Oct 3, 2007

Hi

I have been trying to set up this query via VBA code but, with no luck, have gone back to the query in design view. Basically the parameters of the query are determined by combo boxes in a form. This is fine if one combo box indicates one criteria but a problem arisis when multiple combo boxes are possible parameters for one field.

i.e. Field 1 = combo box one
field 2= combo box two
field three = combo box three, four or five.

i have found it difficult running this, especially in terms of a returning all if a combo is left blank. the problem with setting this up on field three would be that if i run combo box four and five to return all if left blank it overides the other command to set a specific parameter. Also, for some reason i can tdecide whether this is an AND or OR command, its actually both i.e. Field three parameter = combo box three and/or combo box4 etc...

please help this is driving me crazy.

Thanks

Shapman

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved