(Help!) Query On Values In Combo Boxes

Jun 10, 2005

I just started using Access a couple weeks ago. I bought a couple books, have read some help stuff in forums webwide, but I am still stuck on the basics of how to do the following~ Please Help ~

My DB:
I have a single main table, in addition there are several mini-tables used to support combo boxes for form inputing.

My Mission:
It's been requested of me that My Main Switchboard have an option to lead to a secondary form where the end-user can "quick-filter" records to generate a table or report based upon dropdowns and check boxes for 9 different search variables- the data will then be pulled from the original data table based on the 9 choices (or less, as there will be often certain variables left blank).

My Questions:
1) how do I tie the values from the combo boxes in my new form to supportive queries? (perhaps a parameter query with a macro that searches that particular combo box for values??) - or is there a better way to do this?
2) how do I tie all those queries together so that some of the 9 choices can be blank, and of the others the assurance that they'll stack- or further refine the results.
3) one of the search criteria is Industry Sector. there is a mini-table to provide the values for the drop-down, but in the main table there are four columns in case a particular company falls into more than one sector. will this present any problem or can a query be easily tailored to search any of those four columns for that value?

I want to thank anyone who cares to help very much, in advance. I know my issues probably seem very simple, but I've been tasked this duty of learning Access and working the company's DB on my own. The "comprehensive" books that I've purchased haven't seemed to clarify this particular issue, so here I am. :o

View Replies


ADVERTISEMENT

Forms :: Populate Combo Boxes With Values Depending On Selected Value In Previous Combo Box

Aug 5, 2013

I have several comboboxes (6) on my form.How to populate these comboboxes with values depending on selected value in previous combobox.

Example.Lets say that you select value "Audi" in combobox 1, then available values in combobox 2 should be "A4","A6","TT" etc. and if you selected "BMW" in combobox 1, then available values in combobox 2 should be "3-series", "5-series" etc...

View 1 Replies View Related

Combo Boxes - Values And Titles

Dec 7, 2006

I have a form that includes a field for the operating system of the client. I want this to be populated from a look-up table. I want the combo box to display the text name of the OS but enter the numerical ID number to the client table. How do I do this?

View 4 Replies View Related

Ghost Values In Combo Boxes In Form!

Dec 2, 2004

I have set up a nice timesheet form now with lots of help on this forum.


I have a form with a subform(1) which has another subform(2). The form is NOT in Data Entry mode, so users can select their name from the main form, the period from subform(1), and then enter/edit timesheet records in subform(2). In subform(2), I have some combo and text boxes for each record. The first is cboProjectSelect. Column(2) of the selection made in cboProjectSelect is entered into tboProject. Additionally, the selection made in cboProjectSelect filters another combo, cboWorkstream. The records are displayed in datasheet view (I know I've been advised against this, but I've had to do this, because the users want to see all records as they enter their timesheets)

All this work beautifully....for the first record. For some reason, when you enter any subsequent records, it blanks out the values in the tboProject and cboWorkstream boxes for all records! If you click in any of them, the correct value appears, if you click away, it disappears.

The proper records are being entered in the relevant queries and tables, so everything is working fine. It's just annoying that the boxes go blank!

Any idea if there is a way to ensure the values don't disappear?

thanks in advance.

View 4 Replies View Related

Forms :: Filter Text Boxes By Two Combo Box Values?

Aug 6, 2013

I have a form with two combo boxes. The first box lists switch names from a query, and the second lists switchports from another query. The switchport query lists all the switchports for whatever switch is selected in the Switch Name combo box, and all the settings for that port (one column per setting). I want each text box to display the corresponding data from the switchport query for the switch selected in the first combo box and the switchport selected in the second combo box.

View 3 Replies View Related

Forms :: Cascading Combo Boxes With Default Values

May 4, 2013

I've got a form (frmMain) with two combo boxes (cmbCategory and cmbProducts). I have set the combo boxes up to be cascading, so that when you select a value in the cmbCategory box, it influences what is visible and selectable in the cmbProducts box. What I wanted to happen is this:

1. User selects a category
2. cmbProducts defaults to the most recently entered Product within that category, and the form pulls up that product's details.

I have the cascading combo boxes set up so cmbCategory has an AfterUpdate event that runs a macro. In the macro is the command to refresh the cmbProducts box, and the cmbProducts box's RecordSource is set to a query that filters the Products based on the value of the cmbCategory box. I then set the cmbProducts Default Value to a DMax command that pulls the largest ID number from the query. Everything works great, except when I choose one category (the correct product comes up, the latest one entered for that product), then go back and choose a different category without reloading the form. The cmbProducts box stays showing the previous Product, and doesn't automatically update with the latest product for the new category. So it works the first time out of the gate, then just stops working, and won't work until I close and reopen the form again.

I've tried the refresh command, and I've tried adding an AfterChange event to the cmbCategories box. Nothing seems to work! I also tried running a close form/open form command in cmbProducts' After Update to enable the DMax command again, but this blanks out my Categories and Products boxes (which it's supposed to... I don't want anything to come up when you first open the form, both should be blank until you start selecting values).

View 2 Replies View Related

General :: Cascade Combo Boxes With Duplicate Values

Jan 18, 2013

I'm trying to Identify a particular entry in my table for editing via combo boxes. The same serial number will come in multiple times but a different job number each time it comes in. To identify a record for editing I need the user to identify the serial number in combo1 and then the job # in combo2 (cascaded combo boxes).

The issue I'm running into is that combo1 has dozens of serial number duplicates (combo2 is acting as it should). When I change some settings around I'm able to get combo1 to eliminate duplicates but now combo2 only shows 1 job # when there should be dozens for that serial #. I need all like serial numbers to show their job # in combo2 and I have not had any luck surfing around the net/forums/experimenting.

I'm pretty sure I have to use a Junction Table but I haven't messed with that and I'm not 100% sure that's the best/only way to do it.

View 8 Replies View Related

Modules & VBA :: Syncing Combo Boxes Which Are Also Lookup Values

May 1, 2015

I have two tables,

tbl_Retainer
tbl_Retainer_Grant_Funding
tbl_Retainer has the field,
Retainer_ID

And tbl_Retainer_Grant_Funding has the fields,
Retainer_ID (a lookup field from tbl_Retainer)
Agreement_Num (a lookup field from tbl_Grant)

I have a form based off of a query(not sure if that matters), that uses that tables, tbl_Assignment and tbl_Assignment_Grant_Funding. These tables have the above fields as lookup fields.

So...what happens is, if an Assignment has a Retainer, I want the Agreement_Num box to show only the Agreement_Num's associated with that Retainer, otherwise just show all the Agreement Num's.

In my form, I have Retainer_ID with the row source,
SELECT tbl_RETAINER.Retainer_ID FROM tbl_RETAINER;

And Agreement_Num with the row source,
SELECT [tbl_GRANT].Grant_ID, [tbl_GRANT].Agreement_Num FROM tbl_GRANT ORDER BY [Agreement_Num];

In my AfterUpdate event for Retainer_ID I have,

Private Sub Retainer_ID_AfterUpdate()
Dim strSql As String
strSql = "SELECT [Retainer_ID]," & _
"[Agreement_Num]," & _
"FROM tbl_RETAINER_GRANT_FUNDING" & _
"WHERE [Retainer_ID] = " & Me.Retainer_ID.Value

Me.Agreement_Num.RowSource = strSql
Me.Agreement_Num.Requery
End Sub

When I am in my form and choose a Retainer ID, the Agreement_Num box goes blank, and there are no choices to choose from. I am wondering if this is because the Agreement_Num's are sourced from tbl_Grant and not from tbl_Retainer_Grant_Funding.

View 6 Replies View Related

Queries :: Query By Form With Check Boxes / Combo Boxes Not Working

Mar 25, 2013

Attached I have a database that I've been working on which has a form called "frmCriteriaSearch". It is based off of the qryCriteriaListBoxUpdate query. I am trying to get the listbox in the second tab of the results section to work. It queries fine for the checkboxes, but I cannot get the comboboxes to affect the query (unless a checkbox has already been selected)

View 6 Replies View Related

Query On Combo-boxes

Jun 28, 2005

I have a query based on two combo boxes in a form that links to a report, it works fine. What I want to be able to do is select criteria from one box and if the other is blank have it include everything (right now if one is blank the report will be be blank) and vice versa. Any suggestion on what to enter into the criteria section of the query.

Thanks in advance

View 1 Replies View Related

Select Query Using A Value In One Or 2 Combo Boxes

Mar 14, 2007

Hi,

I currently have a select query that has a where statement to select a value depending on the value of a combo box in a form.


WHERE (((tblSampleSubmission.SubmissionNumber)=[Forms]![frmReportPreview]![SubNumber]))


What I am wondering is there any way that the where statement can be for another form depending on what form is currently active by using an "or" statement?

Basically what I am trying to do is make the db as easy to use as possible and not have to type in the value again.

View 2 Replies View Related

Query Based On 1-4 Combo Boxes

May 17, 2007

I have a rather simple query that will produce filtered results based on the user's selection in 1 to 4 separate combo boxes on a form. But I can't get it to do what I want it to do. Here are my vitals:

Form = frmQryAdHoc
City combo box = cboCity (from tblWARNData)
County combo box = cboCounty (from tblCounties)
MWA combo box = cboWMA (from tblLookUpData)

Query = qryAdHoc (source = tblWARNData)
CoCity column criteria = [Forms]![frmQryAdHoc]![cboCity]
CoCounty column criteria = [Forms]![frmQryAdHoc]![cboCounty]
CoMWA column criteria = [Forms]![frmQryAdHoc]![cboMWA]

The query works fine if I make selections in all 3 combo boxes. However, if I make a selection in only cboCity, the query returns no results because it doesn't find a matching record where the city = cboCity and the County and MWA fields are blank.

Here's how I want it to work:

If cboCity = Detroit and cboCounty = Wayne, then
Results = 40 records (where city = Detroit AND county = Wayne)

But if cboCounty = Wayne and cboCity & cboMWA are blank, then
Results = 120 records (where county = Wayne; cities & MWAs = various)

IOW, I want the query to filter only on the cbo's where a selection has been made by the user and ignore any empty cbo's. What statement do I need to enter in each cbo-related criteria field so the query filters only on the combo boxes where a selection has been made by the user?

Any help you can provide will be greatly appreciated. Thank you.

View 3 Replies View Related

Multiple Query Fields & Combo Boxes

Jul 11, 2005

Hi all,

Im trying to do the following query work.
I have a form, with combos , text fields which are filled in with parameters.
The query I want to make is complex.
For example we shall use field1, field2, combo1 , combo2 for explanation.
I want the field1 param AND the field2 AND combo1 AND combo2 to be evaluated for a result. At the same time, I want the user to fill in only field1 and combo1 or like that and the result to be right.
Is there any possibility to make them all work at the same time, individually, or in combinations ?

Sounds too Complicated ?

I ve managed to make it work only by filling in individually the fields or combos and have the right results. The other ways didnt.

Desperately need your helpppp. :rolleyes:

THNK U

View 1 Replies View Related

Multiple Criteria Query Using Combo Boxes

Jan 28, 2008

Hi All,

I am currently having problems with a multiple criteria query with combo boxes (see attached file).

The problem:

- When user defines all 3 criteria (e.g. selects Project: A, Category: Services and Equipment Type: Packages), the query returns a result - no problem here.

- When user defines no fields (i.e. all combo boxes empty), query returns all records - again, not a probelm.

- However, say a user wants to display all records belonging to just Project: A, for example, the query returns no records. Obviously, there a a number of combinations of this (another example would be a user wanting to show records from project: B, with Category: Equipment Type).

I have included the Is Null statement in the query but to no avail. Could anyone advise on a solution based on the attached database. Your help would be greatly appreciated!

Kind regards,

Stephen

View 2 Replies View Related

Forms :: Run Query From Form With Combo Boxes

Oct 23, 2013

I have a form with combo boxes that works beautifully, but I've been asked to add another feature to it. It requires adding a button that runs a query and displays the query results on the screen.The query code is:

Code:

SELECT DISTINCT Product.MSDS
FROM Product INNER JOIN tblStoreProducts ON Product.[ProductKey] = tblStoreProducts.[ProductKey]
WHERE (((tblStoreProducts.MaxUnits)<>0) AND (([Product.HazardKey])<>79))
GROUP BY Product.MSDS, tblStoreProducts.StoreKey
HAVING (((Product.MSDS) Is Not Null))
ORDER BY Product.MSDS;

One of the existing buttons on the form has this code behind it:

Code:
' btnHMIS_Click
Private Sub btnHMIS_Click()
On Error GoTo Err
If IsNull(Me.cboCompany) Then

[code]....

As you can see, the button is able to pass the parameters (which Company, and which Store within the company) to the report.

Code:
' btnMSDSSheetsPrint_Click
Private Sub btnMSDSSheetsPrint_Click()
On Error GoTo btnMSDSSheetsPrint_Click_Err

[code]...

How do I pass the StoreKey information into the query? Is it my query that's wrong?

View 2 Replies View Related

Forms :: Default Values Disappear If Put Values In Text Boxes

Sep 17, 2013

In Access 2010 I have a Data Entry Form on which I have an unbound textbox in the header that the user can put a default date in. In the body of the form is a bound textbox that records the date and the default value is set as =defaultdatestat (obviously the name of the box in the header).

Problem: The default date shows up perfectly until a value is put in any of the other text boxes.

For further info : If you put values in text boxes default value disappears; if you then push escape the default value reappears when the values in the text boxes disappear.

View 4 Replies View Related

General :: Auto Populated Text Boxes To Display Rows From Combo Boxes

Jan 25, 2015

I have strange issue when creating auto populated text boxes which displays rows from combo boxes.

In one database auto populates works with simple text box Control Source edit "=[ComboName].[Column](NumberOfColumn)".

Somehow same method doesn't wotk in different database: here one time I have to insert VBA code at On change Event:

Me.TextBoxName = Me.ComboName.Column(NumberOfColumn)

And other time it wont work with On change but only with After Update Event (code is same).

Another thing this morning happens was that when I tried to add new record trough form where combo box and tex boxes are located, MS Office suddenly stopped working after selecting combo box selection (with message Microsoft Office has Stopped Working). It is 2013 version.

I got it work after deleting and re-inserting VBA code to autopopulate text box at After Update Event.

View 3 Replies View Related

Forms :: Database With 3 Tables - Linking Combo Boxes And Text Boxes

Jul 29, 2015

I currently have 3 tables within a database with student details of three different classes. I need to create a user form that has a dropdown box which I can select a student from one of these tables with a number of text boxes below which brings up all the students details, then once the student has been selected and the correct details are shown then I need to create a button which allows me to move that student from one table to another.

View 4 Replies View Related

Queries :: Multiple Combo Boxes And Text Boxes On A Search Form

Mar 24, 2014

I'm trying to build an database for aircraft operators. I've got the basic tables structure and relationships but I'm stuck on building an search form to filter records by user input.I've got following controls on my form (unbound):

1. AircraftType (combo box) from tblAircrafts
2. CompanyName (combo box) from tblListOfAircraftsOperators
3. TeailNumber (text box) from tblAircraftOperators
4. AirportNameSearch (combo box) from tblAirports
5. PassengersNumber (text box) from tblAircraftOperators
6. ManufactureYear (text box) from tblAircraftOperators
7. SourceSearch (combo box) from tblInfoSource
8. CountrySearch (combo box) from tblCountry
9. CategorySearch (combo box) from tblAircraftCategory
10. EamilToOperator (text box) from tblAircraftOperators
11. InteriorPhoto (Bound object frame) from tblAircraftOperators
12. ExteriorPhot (bound object frame) from AircraftOperators

I need to enable users to search for aircrafts based on those criteria. As I mentioned I'm new to Access and I don't have any advanced coding skills. I have a query build to perform the search and this is the code I've managed to write so far:

SELECT AircraftOperators.RegistrationNumber, AircraftOperators.PassengersNumber, AircraftOperators.ManufactureYear, AircraftOperators.EmailToOperator, AircraftOperators.ExteriorPhoto, AircraftOperators.InteriorPhoto, tblListOfAircraftOperators.OpratorName, tblAircrafts.AircraftType
FROM tblAircrafts INNER JOIN (tblAirports INNER JOIN (AircraftOperators INNER JOIN tblListOfAircraftOperators ON AircraftOperators.CompanyName =

[code]....

View 2 Replies View Related

Modules & VBA :: Query Results To Populate Combo Boxes

Sep 24, 2013

My company is finally using my accounts package (alongside our original package until we can be certain there are no bugs).

Anyway just adding nice to have features at the moment.

I've got a form that has 5 combo boxes where the user can select 5 customers. Then a button so they can graph the amount of money generated by each customer and compare them.

I've just made a query to return the top 5 highest grossing customers.

What I what to do now it feed the query results into the combobox values when I press a new button on my form.

How do I go about this?

View 1 Replies View Related

Queries :: Filtering Query With Text Box And Combo Boxes

Jul 23, 2015

I am creating a query that should filter records of events based on multiple fields. The filters should work with any combination of field criteria, but only two of the four field are working properly, as follows:

1. a text box for searching with event name (free text) - this is working;
2. a combo box to filter events by country name - this is working;
3. a combo box to filter events by event's keyword (category) - this is NOT working;
4. a combo box to filter events by year - this is NOT working

View 2 Replies View Related

Forms :: Changing Multiple Text Boxes To Combo Boxes?

Mar 14, 2014

there is a way to convert multiple text boxes to combo boxes all at once, rather than right clicking on them one at a time, and selecting Change to.

I have a form with about 50 fields and most of them need to be converted to combo boxes. I'd always done it manually one at a time up to this point, but I'm trying to build up my learning and look for smarter ways to do things.

View 4 Replies View Related

Forms :: Search Form Using Both Combo Boxes And Check Boxes

Jun 5, 2014

I am trying to make a search option in my form header. Right now I have two unbound combo boxes (CboAccountsfilter and cboCourseName) that I can use to filter my records. Currently, I can use the drop down for CboAccountsfilter and a list of accounts will appear. When I select one, the corresponding Course Names will appear in cboCourseName. This works fine...Code below. I would like to take the filtering a step farther and add checkboxes to filter the data. I my form, there currently exist several check boxes (yes/no)...(Priority, Rep Top Target, Manager Top Target, ect). I would like to have the option to use a check box to filter. I.E if I had a checkbox in my header called PriorityFilter, if checked it would only bring up those records that met the two combo boxes criteria and was a priority.

Below is the code I have so far...it doesnt have anything for the checkbox because I am at a lost of how to get started.

Private Sub CboAccountsfilter_Change()
Me.Requery
Me.cboCourseName.Requery
Me.Check178.Requery
End Sub

[code]...

View 1 Replies View Related

Queries :: Multiple Combo Boxes In Single Query Criteria

Nov 20, 2013

I managed to get separate combo boxes to filter out results on a query, however now I have a slightly different problem.

I managed to get the combo boxes to filter records in different query criteria, i.e criteria A for field A, criteria B for field B, etc.

Now I would like to have several combo box filters in one criteria field, however no matter how much I try to move the code about, they either filter out nothing at all, or show up blank records as they're filtering one after the other, i.e filter for A, and then B, which clearly won't work as there will be no B if you've already filtered for A.

The code I'm using in each criteria box is;

Like "*" & [Forms]![MyForm]![Combo1] & "*"

and this works as a single criteria in a single field.

View 5 Replies View Related

Queries :: Search Query Using Multiple Combo And Text Boxes

Aug 13, 2013

I have a table with all information on it, that is input via various forms, I then have different queries pulling information from all information to run reports off. These all work fine, my problem is my 'Search Form' - below

I have created a query that finds information from 'all information' using

Like "*" & [Forms]![SearchAll F]![txtDateRasied] & "*"

This is working on all text boxes, It only half works on the combo box's when I use

Like "*" & [Forms]![SearchAll F]![combofailureanalysis] & "*"

If a selection is made in the combo box the query brings the correct results, however, if all the fields are left blank it should bring up every record, but it doesn't do this. I am certain it is the combo box's that are causing this anomoly as when I remove the combo box criteria it works perfectly again.

View 11 Replies View Related

Queries :: Setting Criteria For Query Based On 3 Combo Boxes

Jul 10, 2013

Ok so im working in MS Access 2007.

I want to create a query based on 3 combo boxes but have it so that if the field in the second or third combo box is not populated the query still runs.

Right now i have the Criteria set for the three columns that i wish to sort by as seen below.

Column 1
Criteria: [Forms]![Entity Selection Form]![areabox2]

Column 2
Criteria: [Forms]![Entity Selection Form]![devbox2]

Column 3
Criteria: [Forms]![Entity Selection Form]![entitybox2]

This gives me the correct query result but im forced to make a selection from each combo box. Is there a way to progamme it so that if I only make a selection from the first combobox and leave the others blank i can still get results in a query?

View 2 Replies View Related







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