Multi Combo Box Query

Aug 23, 2005

Working on a sales guest registration database and need a some assistance with a query for my report. I have the following fields in the table:

Communities
RepName
Date1stVisit
MoveTime

I have created a query which works without a problem. I have also created a dialog form to use with a report that I've created. Everything works ok if I fill in all the boxes on my form with data but in some instances they want reports that are not filtered all the way down. On my form I have an unbound combo box for each of the fields above. I've tried several of the suggestions found here but cannot get it to work completely. The last thing I tried was the following criteria for each field I want to filter on:

like [forms]![repdialog]![communities]& "*" or is null
like [forms]![repdialog]![repname]& "*" or is null
>= [forms]![repdialog]![datebeg] and <= [forms]![repdialog]![dateend]
like [forms]![repdialog]![movetime]& "*" or is null

This sort of works but I must be missing something because it gives me too much data. For instance if a just wanted to fill in the REPNAME box on the form it should give me every record that has that name in it but I get more that that - I think because of the is null comments. Any one help me correct this?

Thanks,
Chester Campbell

View Replies


ADVERTISEMENT

Queries :: Using Multi List Box And A Combo Box In Query

Jan 23, 2014

I currently have a database of customer information and form set up with a MultiList box based on the regions those companies are based. You select the region(s) you require from the list box, click a button and it runs a query.

However I now want to be able to filter the results further using a combo box with business sectors in also.

The code used for the multilist box is as follows (I don't totally understand all the code if I'm honest, but it works )

Private Sub Command2_Click()
Const cstrQuery As String = "CAMPQRY"
Dim strNames As String
Dim strSelect As String
Dim StrWhere As String
Dim varItm As Variant

[Code] ....

View 2 Replies View Related

Queries :: How To Activate Query Criteria For Multi-combo Box Via Form

Aug 12, 2014

I am trying to make a form where the user can check/uncheck query criteria via several check boxes. The idea is that the user can start with many criteria and then deselect criteria if the search does not return enough results.

I have been setting up several queries and thought I would combine them in a "Master Query", since I thought it may be easier to deal with each criterion and the respective switch this way.

Lets say we run a hairdresser.

I have a field in the form that allows me to select clients. This is also used in the query. Works fine. Now to the hard part.

Example 1:

Each customer has a budget to spend on haircuts.
Each hairdresser offers haircuts from $x to $y.
The query should return all hairdressers that are appropriate for the budget of the selected customer.
There should be a yes/no button on the form to ignore or use this criterion.

Example 2 (this completely threw me off):

Each customer has a set of preferred services from a table (e.g. cutting,washing, coloring).
Each hairdresser offers certain services also based on this table (e.g. cutting,washing, coloring, drying).
The customer and hairdresser table use the services table and a multi combo box to select the services.
The query should return only hairdressers that offer some or none of the services wanted by the client.

Again, there should be a services yes/no button on the form to either ignore or include this criterion.

To clarify, the hard part for me is the query. I am fine with setting up the tables and the form. Just not sure how to implement something like "IF (ServicesCheckBox = -1, 'then use service criterion', 'ignore service criterion')".

View 7 Replies View Related

Multi Record/Query/Multi Table/Going Crazy Issues

Sep 7, 2007

I have spent the last couple of days trying to figure out how to make this work.

I have three tables.

tblIntakeMain
[IntakeMainID]

tblIncidentDetails
[IncidentdeatailsID]

tblPersonnel
[PersonnelID]

On the main form I use subforms to link tblIncidentDetails and tblPersonnel to tblIntakeMain. Both subforms can, and do, have many entries. This all works fine. What is not working is the search form I am using.

I am using Gromits most excellent Search Form. The problem is when I create a query, qSearch, to bring together the three tables I get a multiple records which makes the searches very confusing and near useless. Is there anyway around this? Is there something I am missing? Is there another search method I could use that would work in a similar way as Gromits? Please help before the Prozac runs out and I lose my mind--what little it left.

View 5 Replies View Related

Combo Box Multi Selections?

Jan 27, 2005

I would like to select multiple records from my combo box not at the same time but each selection to be added to another text field in my form.

PROBLEM: When I select a record that 1st selection is populated in the other text field however when I want to select another choice to be added with the 1st choice the selection overwrites the 1st choice instead of adding to it.

View 4 Replies View Related

Multi-line Combo Box

Sep 14, 2005

I want to have a pick list where I can click a combo box down arrow and it shows some options but these options would be in this format:

Record1:
Line1
Line2
Line3

Record2:
Line1
Line2
Line3

The reason is that they are 3 line adverts.

What is the best way to do this? Is it possible with combo box or should I do it in another way?

Thanks,

Dave

View 3 Replies View Related

Multi-column Combo Box

Sep 15, 2005

I have a combo box with 5 columns. When I click it I want to display columns 1 to 4, together with the headings. But after making my selection, I want column 5 stored in the field.

How can I do that? Currently it is storing column 1.

Thanks,

Dave

View 2 Replies View Related

Multi-Select Combo Box

Dec 12, 2005

Is there any way to have a Multi-Select Combo Box fill a single field in a table? I've been messing with this for some time now and just can't seem to figure it out.

Thanx in advance
Karen

View 4 Replies View Related

Multi Combo Boxes, Which One Runs

Oct 20, 2005

I have 6 combo boxes on a form, which call a report based on a query. The idea is that the user can query data 6 different way. How do I/ or the user know which one is actually running first. Would the order left to right make a difference? (None have sort ascending or descending)

View 1 Replies View Related

Forms :: Cannot Get Multi Combo Box Search To Work

Jun 14, 2015

I used the Contacts demo on Access 2010, made all the elements Client from web based and then exported to a new database. It worked for the most part but now I am trying to put in a 4 box search and am getting stuck on which form to link it to and also where to put these boxes.

View 1 Replies View Related

Forms :: How To Create Multi Value Field Using Combo Box

Oct 7, 2013

How do you create a Multi-Value Field using a Combo Box on a form?

View 1 Replies View Related

Forms :: Multi Filtering With Combo-boxes?

Jan 1, 2014

I have three comboboxes and I want to have the first one filter the second one and the filtered second one filter the third one.

Filtering the first one on the second one works, but when I whant to add a third one to it, it just shows blank spaces on the third one.

What I did to the first and the second combobox :

1: I pressed the second combobox.
2: Went to rowsource.
3: filled criteria in on the value i whant to connect the first combox to the second combobox ( [Forms]![Thetableimin].[1stcombobox].
4. requery the second combobox in programcode on the first combobox.

What I did to the second and the third combobox:

1: I pressed the third combobox.
2: Went to rowsource.
3: filled criteria in on the value i whant to connect the second combobox to the third combobox ( [Forms]![Thetableimin].[2ndcombobox]
4. requery the third combobox in programcode on the second combobox.

How do I make a third combobox that uses the filtered values of the second combobox to filter the third combobox.

View 7 Replies View Related

How To Make A Multi-valued Combo Box In A Form

Apr 14, 2015

I have a field in a table that I want it to be multivalued. The values are stored in a different table. I tried to do that and it worked fine. But when I wanted to display a pie chart in a report based on a query, the values didn't show up.

Example:

EmployeeName: X
TermenationReasons: 1,2,3 (multivalued field - values stored in a different table)

I though of just changing the field type to a text, and create a combo box in the form that allows me to add multiple values, and appear on the table and the query, and the pie chart too.how to make a multi-valued combo box in a form.

View 3 Replies View Related

Formatting Date In Multi-Column Combo Box

Apr 14, 2015

I have combo boxes that contain attorney names and phone numbers. The attorney name is what is filled into the field when a selection is made from the combo box into the form. The phone number is just there for the occasions that the person managing the data in the database needs to call that attorney. Just a quicker way instead of having to go to another form to find the phone number. I created a query to combine the first and last name to one field (FullName) and this is where the combo box gets it's info.

When I run the query, the phone number is shown formatted as I want it to ((###)###-####), but in the combo box in the form, the phone number has no format to it. What I need to do to get the phone number to show up formatted in the combo box list?

View 2 Replies View Related

Multi-Column Combo-box Won't Bresk Down In Text Boxes

Aug 16, 2005

My form's 10 column combo-box (based on a query) won't break into text cells. Some of the columns contain numbers, some test, some phone #s. All columns show when I click the Combo-box in Form View. Access Help File said to put:
=Forms!Customers!CompanyName.Column(1) in the ControlSource for the text cell. Tried that and was returned #Name? for any of the fields in which I tried it.
My expression was:
=frmSpartanStudentBehaviorLog!Last_FirstUC.Column (3)
The other properties in combo-box are set correctly: ColumnCount=10, Column Widths are correct.

I also tried the expression:
=Last_FirstUC.Column(2) but got the same result #Name?

I'm baffled. As a very new user, I'll appreciate any assistance. Thanks.

View 2 Replies View Related

Modules & VBA :: Adding Combo Box To Dynamic Multi Search

Jul 27, 2015

I stumbled on to a Dynamic Multi Search form on this site and have been tailoring it to my organization's directory of contacts. Everything was going good until I was asked to include a search by groups to which each individual may belong. The data in the table is contained in Yes/No check boxes for around 30 different groups. I am hoping to add a combo box to the Dynamic Search as a means to pull up individuals in any 1 category. Below are two attempts at what I thought might work, however, neither performs any filtering.

Code:
Private Sub Groupbox_Change()
Dim db As Database
Dim qdf As QueryDef
Dim strSQL As String
Set db = CurrentDb
Set qdf = db.QueryDefs("qryGroup")

[code]....

View 6 Replies View Related

Filter Report By Multi-select Combo Box Criteria

Nov 15, 2011

I have a form that contains three multi-select combo boxes, called Market, Readiness, and Role. I am trying to use the user-selected criteria from these boxes as parameters for my query, which is linked to a personnel report.

I have been attempting (without success) to modify code to gather all the selections in each box and then open the updated report. The code below uses the combo box called "Market" and a report called "Succession".

Private Sub Run_Report_Click()
Dim StrWhere As String
Dim varItem As Variant

If Me.Market.ItemsSelected.Count > 0 Then

[Code] .....

Questions:
1. This code is missing something, since when I click my event button to run it, a box pops up to ask for the parameter I already gave in the combo box.
2. What is the syntax to add in the other combo box selections?

View 6 Replies View Related

Multi-table, Multi-criteria: Avoid Repeating Records

Apr 10, 2008

Hi everyone. Apologies if this has come up before, but the search terms I've tried here and on google keep turning up the wrong information.

At work I manage a large database with many tables. It stores data for participants in a research study. Each table stores the data for a different test, so one participant may have multiple records. Primary keys for these tables are defined by a combination of the participant and date of test fields. (Everything is dependent upon a table that stores the static info for participants, so the database is normalized.)

I want to be able to make a table that lists target participants and dates, and then create a query that looks at this table and pulls all the available data from various tables for those individuals that was recorded within one year of the target dates.

I've successfully made queries that meet these criteria while pulling data from only one table. The problem I'm having is that when I try to pull from multiple tables, each with it's own date field that needs to be used as a criterion, I end up excluding almost all the data, because most of the target participants do not have all the requested data within the target dates.

I've tried being inclusive with my criteria (using ORs), but then I end up with tons of data that I don't want and I need to filter through it, which defeats the purpose of the query.

Any advice on handling this issue, or do I basically just need to create a separate query for each table?

I'm sorry if this is too vague, but it's illegal for me to upload any of my own dataset. I could probably come up with an example if it's helpful, though.

Thanks!

View 7 Replies View Related

Compiling Multi Step Query Into Single Query

Dec 8, 2011

I'm new to access, and have discovered its easy to write large queries by breaking them up into smaller queries and having each subsequent query reference the one before it. My problem now is that I want to combine these queries into a single query, so as to make it easier for anyone who comes after me to edit/understand what was done. I can't seem to find a good explanation of how to do this, but it seems like there should be a way.

View 1 Replies View Related

Multi Table Query

Sep 28, 2007

I have a query that includes 4 different tables. It only shows info for the Sales Orders that have information in all four tables.
Is there a way to get it to show any information available? For instance, if it only has info in two of those tables, it would show that info and the fields for the other two tables would be blank?

View 5 Replies View Related

Multi-record Query

Oct 1, 2007

I have a nine-table database about the people in a certain no-longer-existing East European village. So it revolves around a main table, called PersonLOG, of people who used to live there, each with a unique ID#.
There is another table that list facts about the people: PersonFACTS. This table has, among other fields, three fields for three types of sources. One is called SubmitterID; this is the code for a person who submitted a testimony page attesting to that persons' death in the Holocaust. There is also a text field that a particular "factoid" can be typed into. There may be many fact records about any individual. So there is a one-to-many rel. between the PersonLOG and PersonFACTS.
There is a 3rd table called MAIN, that lists the "vital" information about most of the individuals. It includes one yes/no field indicating whether they died in the Holocaust.
I am trying to create a query that would list only those Persons for whom there 1)is no Submitter and 2)Died in the Holocaust. This requires that all of the records in PersonFACTS pertaining to a given individual be compared, looking for the ABSENCE of a FACT record for that person that has a submitter attribution, and then comparing to "and"-ing that with the yes/no field described. I can't see a way to do that.
My apologies if this question is too complicated.
Thanks!:confused:

View 8 Replies View Related

Query Help - ID's Multi Fields

May 30, 2006

Hi I Like to know how to aquire the correct results:

Table:
ID - Personalinfo - location - records - date
102 - Dave Blogs - Bristol - Queen - 12.12.03
103 - Brian Smith - Plymouth - SKA - 12.11.03
102 - Dave Blogs - Bristol - Madona - 12.12.03

By selecting the ID I want to show all listings for that ID.

ie:
102
Dave Blogs
Bristol
Queen 12.12.03
Madona 12.12.03

Im going round in circles

View 4 Replies View Related

Complex Multi Part Query

Feb 10, 2006

I have a query which calculates Lagtime: which is the difference between the audit date and the current date.

Lagtime: DateDiff("d",[Auditdate],[Date]) and the criteria is >30
this works fine and shows the reports that are over 30 days overdue.


Now I need: There are 2 fields (both are y/no) Minor and Major. Minor need to be answered >30 and Majors with in >7,

how would I write the expression show me Lagtime if over 30 days for a minor and 7 days for a major.

View 1 Replies View Related

Access Query Multi Field Help?

Sep 7, 2006

I have a database... 1 table...40 fields..

I currently have a query set up as a basic a LIKE search for each field and I have to do 40 each time..

Is there a way of being able to do 1 query and have it search all 40 fields?

So my field headings are
Part No
Description
barcode..
Album name
Singer/Group
and so on...

I since some of the albums are compliations I require to search all the fields...

Any ideas?

View 6 Replies View Related

Multi-table Query Question

Apr 9, 2008

I'm not quite sure on how to go about this query.:confused: What I need to know is if a certain patient has had an immunization or not. I need one query to show the patients who have had an immunization and another to show the ones who have not had the immunization.

I have two tables.

Appointments
Date_of_Service
Patient_Name
Chart_ID

Immunizations
Patient_Name
Immunization_Date
Chart_ID

They are joined on Chart_ID.

Any help would be greatly appreciated! :)

View 7 Replies View Related

Forms :: How To Get Multi Value From List Box To Be Used In A Query

Apr 25, 2014

i need to know how to get the multi value from list box in my form to be used in a query the list box worked great when it was not multi value

View 3 Replies View Related







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