Combining Values Of Comboboxes

Dec 20, 2006

Hi! I have a problem combining values of comboboxes, let me explain me better...

I have a text box and two comboboxes on a form
First, you introduce a data on the text box, then you select something of one of the comboboxes

the third combo box have to have the value of the text box and the value of the combo box separated by a comma or a space. Please help me with this. I need to finish this database soon:confused:

View Replies


ADVERTISEMENT

2 Comboboxes, The Values On The Second One Will Depend On The Value Of The First One.

Mar 14, 2006

Hi,

I have a problem and I need any help I can get!

I have a master form (MasterForm) and a subform (SubForm).

in the SubForm I have 2 comboboxes (Institution) and (Office).

Each Institution has a number of Offices.

What I want is:

Based of the Institution the user choose, the offices that belong to this instituion will appear in the combobox.

How can I do that?

Regards,
CS.

View 6 Replies View Related

Reports :: How To Add Selected Values From All Comboboxes To A Report

Jul 19, 2015

I have a frmOpenReport which has 7 combo boxes linked to 7 Query's.

I have found code to add selected values from one combo box from a button 'Open Report' to a report but struggling to find how to select selected values from all comboboxs and add to a report.

My code so far.

Option Compare Database
Option Explicit
Private Sub cmdOpenReport_Click()
On Error GoTo Err_cmdOpenReport_Click
Dim strWhere As String
Dim ctl As Control
Dim varItem As Variant
'make sure a selection has been made
If Me.HLO.ItemsSelected.Count = 0 Then

[Code] ....

View 6 Replies View Related

Reports :: Filter A Report Based On Values In Some Comboboxes

Aug 17, 2015

I am quite new to Access and have been working with a sample DB from Microsoft. I have been looking for some ways to filter a report based on the values in some comboboxes, and have followed the instructions on a website (can't post link yet).

I also looked at this file (**can't post link yet**) and it seems like everything works fine here. So I started a new DB with my own table, and tried to do the same thing as in this file.

Everything works fine.

But when I try all these steps in my own DB (the sample DB from Microsoft), it doesn't work.

When I filter by "Status" (f.ex: "In Progress" or "Not Started"), it seems to work fine.

However, when I filter by "Assigned To", I get the following error message: "Data Type Mismatch in criteria expression". So I googled this error message , but this field has nothing to do with any date formatting.

It gets even stranger when I try to filter by "Project":

Then a new pop up appears and asks me to enter the "Project".

No matter what I enter, the report turns blank

View 14 Replies View Related

Forms :: Swap Values In Comboboxes With Requery Applied?

Jan 13, 2014

I have two comboboxes on my form. When the value of the first combobox (SourceWH) changes it performs a requery on the second (DestWH) as the drop-down list needs to be filtered depending on the first value. I have this working fine but my problem arises when I need to be able to swap the values of each combobox. I have created a command button which stores the value of each combobox and then swaps them but my problem is that if I click the button the second combobox becomes blank. I guess this is something to do with the requery taking place after the value of the first combobox is updated but am unsure how to rectify this problem.

The first combobox has the following expression in the expression builder:
Action Argument
Requery DestWH

The command button has the following code:

Private Sub Swap_Btn_Click()
Dim SourceValue, DestValue As String
SourceValue = Me.SourceWH.Value
DestValue = Me.DestWH.Value
Me.DestWH.Value = SourceValue
Me.SourceWH.Value = DestValue
End Sub

View 3 Replies View Related

Combining Values

Sep 9, 2005

I am pretty new to access and struggling with a query problem. I currently have a table containing data like:

Name_____________Color Chosen
Bill..............................Red
Bill..............................Blue
Tom............................Red
Mark...........................Green
Bill..............................Green
Tom............................Blue

And I would like to be able to get to

Name______________Colors Chosen
Bill..............................Red, Blue, Green
Tom............................Red, Blue
Mark...........................Green

Can anyone suggest a query to get me this second table. Theoretically the maximum number of Colors that one person can choose is 4.

Many thanks in advance

Chris

View 5 Replies View Related

Combining Two Boolean Values?

Feb 11, 2012

I basically have two yes/no fields in an access table. I want field one to have the value yes if field two has value no, and the other way around.

I had a look at the Boolean operators, but im not sure where to go from there.

View 6 Replies View Related

Combining Calculated Values From Two Queries.

Aug 24, 2006

I have created two queries which calculates a total. I want to add the values of the two queries in a third query to give me a grand total.

When I try to create this third query, it gives me an error saying that the fields cannot be used from two different queries. So I'm just wondering whether this is possible or is there any other way of doing this.

View 1 Replies View Related

Forms :: Combining Values In Expression Using IIF?

Apr 30, 2014

I'm trying to create a text box on a form which displays a value based on numerous criteria.

Basically I manage a database of employees. Some are external employees, some are internal. Some have left the organisation, and some are still employees.

I have two fields which need to be pulled into this expression:

is_leaver - text box, with value either "Yes" or NULL

organisation - name of organisation (text)... lets say my organisation is called Happy People Ltd

The text box I have is called employee_status

I can see that there are 4 possible combinations:

1. Internal Employee - Is an internal employee and still works here
2. Internal Ex-Employee - Is an internal employee but has left
3. External Employee - Is an external employee who still works here
4. External Ex-Employee - Is an external employee who has left

So far I've managed this:

Code:
=IIf(IsNull([is_leaver]),"Employee","Ex-Employee")

This displays whether they're an employee or ex-employee. How would I form the expression to combine the two fields, and calcuate whether they're internal or external?

Due to the way the form is set up I don't want to have two separate text boxes and would prefer to combine it.

View 5 Replies View Related

Reports :: Combining Same Values From Two Fields

Aug 21, 2013

I would like to make a report to show how many employees and which employees are attending to which colleges/universities.

In my data (800 records), I have two fields which is "College 1" and "College 2" for each employee.

There are values that are enter in college 1 for some employees, other employees have the same value that is enter in in college 2. How do I get to show a report that has all the employees who attended the same college in either college 1 or 2?

For instance, this is my raw data:

Name - College 1 - College 2
Bob - University of HI - Honolulu CC
Sandy - Honolulu CC - University of HI
Clare - Kapiolani CC - University of HI
John - University of HI - Windardward CC

I want my report to show:

Colleges -
University of HI
Bob
Sandy
Clare
John

Honolulu CC
Bob
Sandy

Kapiolani CC
Clare

Windard CC
John

View 4 Replies View Related

Combining Rows With Duplicate Values

Jun 17, 2013

I am working with an Excel file of raw data aggregated from an annual customer relationship survey that has been sent out since 2010. The file has approximately 20,000 rows, meaning the survey has been taken around 20,000 times. Unfortunately, each time a customer takes the survey, it is included in the raw data as a separate entry. Therefore the file has numerous duplicate email addresses, corresponding with unique data for each time the survey was taken. Another issue regarding the data, is that in the first year the survey was sent out, the distribution mechanism "broke" and the survey was sent out multiple times (and completed multiple times) in the same year by the same customer, so the surveys are not necessarily uniformly distributed, if that makes sense.

I have been interested in isolating the common respondents (those who have taken the survey across multiple years, albeit not necessarily consecutive years). Up to this point, these respondents have been isolated manually using a pivot table, however I am now looking to enter the raw data into SPSS (a statistical analysis package), in order to view the drivers of these common respondents.

Therefore, I would like to be able to isolate these common respondents and the data corresponding with their surveys from the raw data in a separate worksheet or file. I have tried various formulas to do so in Excel to no avail. Is there anyway to accomplish this in Access or would a more complex database be needed?

Ideally the final product would have the common respondents' information from multiple surveys in one row and would be able to be filtered by feedback date (found in the raw data), so that hypothetically one could select a month and be able to tell how many customers considered to be common respondents completed a survey within that month.

View 8 Replies View Related

Combining Two Text Box Values Into One Label

Jun 12, 2013

I have two text boxes, and i want to make there value be the label for the form. Here is what i have in the Label on the form:

=Nz([Last Name] And [First Game],"Untitled")

Where am i going wrong?

View 5 Replies View Related

Queries :: Combining Fields - Spacing Between Values

Mar 6, 2014

I'm creating a query which pulls together the numerical values of 32 separate fields. Each field has the potential to have a value in it ranging between 1 and 9, but most fields will be blank.

I want to prefix the value (if the value is not null) with a 2 or 3 character-long code relating to the field name.I then want to combine them all together in a query so I can easily copy and paste the output to a spreadsheet.Here is what I have so far, with just 9 of the field names, and it's already looking a bit clunky.

Code:

IIf(IsNull([zam_adm]),"","ADM") & [zam_adm] & " " &
IIf(IsNull([zam_cts]),"","CTS") & [zam_cts] & " " &
IIf(IsNull([zam_crs]),"","CRS") & [zam_crs]& " " &
IIf(IsNull([zam_IPB]),"","IPB") & [zam_IPB]& " " &
IIf(IsNull([zam_opr]),"","OPR") & [zam_opr]& " " &
IIf(IsNull([zam_owl]),"","OWL") & [zam_owl]& " " &
IIf(IsNull([zam_pmi]),"","PMI") & [zam_pmi]& " " &
IIf(IsNull([zam_wl]),"","WL") & [zam_wl]& " " &
IIf(IsNull([zam_sgt]),"","SGT") & [zam_sgt]

The output, unfortunately, is putting spaces between empty fields and I'm not sure how to prevent this in the syntax?

View 3 Replies View Related

Queries :: Combining Columns And Replacing Certain Values

Sep 29, 2014

I need to create a query that combines two columns (lets say Column A and Column B for example) however the problem is that whatever non-null values that are in Column B must replace any value in Column A. If Column B has a value that is null then Column A's value is shown.

I have an example of what I'm working with (access file) and what result I want (excel file).

View 2 Replies View Related

Forms :: Combining Date And Time Values Using DateDiff

Jul 8, 2014

I'm trying to create my own database dealing with hiring bikes on a daily basis.

I have created a form for the basic input, including StartDate, StartTime, EndDate and EndTime, followed by TotalDays. I added the time field so that if a client brings a bike back an hour or two after the pickup time on a later date (sounds complicated - e.g he takes it on Monday at 12pm until Thursday 14pm) then he would be charged for an extra day. It is similar to the car rental system used worldwide.

The TotalDays is currently using a simple expression =EndDate-StartDate.

Is there any way to make the form incorporate the time difference so that if EndTime-StartTime>1 then it would add an extra day to the "=EndDate-StartDate" calculation.

View 3 Replies View Related

Queries :: Drop Down - Query Not Combining And Filtering Values Based On A Form

Jul 22, 2014

I have a form (DropDown form) that has 3 drop down fields, you select your values from the drop downs and you would push a command button that runs an event procedure which runs a query (DropDown qry test). The user should have the option of picking any combination of fields to filter by. Or no combination, which would return all values in all fields. So I am basically using the form as parameter's for the query.

The problem I'm having is that my query is returning values for one field AND values for another field. Even if the other values selected are not in the same record. It's not combining the fields together to filter. For example: you pick a Project name and Supplier name, the query will return records that have the project name you selected but it will also return records with the supplier name you selected that have a different project name.

I've attached screen shots of the form and the design view of the query (the screen shot cut off the last column name. It is meant to say "Expr3: [Forms]![DropDown form]![Combo7]").

Using Windows 7,
Access 2010

Is there a way to select multiple values from the drop downs?

View 14 Replies View Related

Combining Multiple Columns Into One Longer Column (without Combining Fields)

Jul 17, 2013

I trying to combine three columns that I have into one column without combining fields.

Currently what I have:
(see image below)

What I want:
ID-----MOC
##----name1
##----name2
##----name3
##----name4
##----name5
etc

The list I have will be much longer and will be changing frequently, which is why I can't just go on excel and manually do this.

View 14 Replies View Related

Queries :: Combining Queries Without Matching ID Values

Feb 2, 2015

I have two queries:

1. a sum of payments by individuals
2. a sum of charges of individuals.

I want to combine these queries to create a report that shows the sums for each person of the charges and payments and calculate the balance. However, it is only showing me those individuals that have both a charge sum and a payment sum, while some individuals will only have a charge sum. How do I get those individuals to show and show with a zero payment balance if they are in my charge sum query but not my payment sum query and vice versa (some may have made a prepayment even though they have not been charged yet).

View 5 Replies View Related

Pictures In Comboboxes

Apr 19, 2006

OK, I asked this question a day or so ago and got some feed back. What I would really like is a difinative answer. Basically Yes or No. Is it possible to add small picture, (icon size) to a comobox. I realise its not good practice to have pictures embeded in the DB but on this occasion its what I need to do. Ive found software on the web that allows you to do it, which leads me to belive that it can be done, any ideas!

View 6 Replies View Related

Cascading ComboBoxes

Sep 2, 2005

Hi

I have 4 Comboxes all Cascading from one an other and it's all working fine.
My question is about My fourth combo boxe, It as two fields that the user can see when he selects the fourth comboboxe; pretty straightforward...

I want the user to see the two fields on the form after using the combo boxe. For this I have one of the record to populate the comboboxe and the other one to populate an other text box using the dlookup function where the criteria is = to the field selected in the combo boxe, I hope you're following...

Now, some of my records for each fields are not all different from each other so when the user select a set of value the "dlookup text box" may have several option: the index is not unique if you see what I mean...

To have the unique index, I would need to add to the 4th combobox the primary key which is an autoNo that the user doesn't really need to see...

So... I am thinking of hidding the primary key column in the comboBoxe and make it the main field THEN write a code on the after Update of the Comboxe to hide the comboxe and show a text box placed over the comboxe with a dlookup function with a criteria = primary key and an other text box set on a different field with the same criteria.

I hope this is making sense, I was wondering what you were thinking of this method, it seems to involve a lot of fiddling which I don't mind but I'd rather make sure that i making it right.

View 3 Replies View Related

Help With Multicolumn Comboboxes

Sep 22, 2005

I created a combobox with 2 columns, and i donīt know how to fill it using code, I tried with :

combobox.AddItem ("table.fields(0) ; table.fields(1)")

also tried

combobox.rowsource

but when I run it, it shows them litteraly and not the value stored in the tables thank you for your help!

View 4 Replies View Related

Hi! I Need Help With Comboboxes, Listboxes...

Dec 5, 2006

I have a form with many combo and list boxes, but i don't know how to find a relation between them. I want to select a name of a product that is in a combobox and then a list or text box will show its description.... Please help me because I will burn out sooner or later :eek:
KD:confused:

View 12 Replies View Related

Access ComboBoxes

Dec 8, 2004

Hi,
I wish to create a combo box based on a query. There is a vendor name and vendor ID. The combo box will show the vendor name when dropped down and let the user select by name but it will then store the vendor ID when a user selects so basically I need this

Combo Box row source is vendor name
but when it stores, it stores the ID like 1, 2, 3, 4, 5, 6. Does anyone know how to do it?
Adwait

View 3 Replies View Related

Forms With Comboboxes

Mar 15, 2005

HI ALL,

I Have A Form With A Combobox When I Choose A Record from The Box,
The Matching Info From The Table Populates A Textbox
Example
I Choose The Acct Number From The comboBox And The Company Name Goes In a Textbox and the phone number in another textbox
looks like it is fine on the form My Problem Is That When I Look At The Table The Company Name Is In Its acctName field But The Account Number Field Has The Companies Name Aswell
How Do I Fix This-
and also if you type the number in the acctnumber field on the table it places that number in the acctname textbox of the form there is something that is mixed up here but i dont where

please help
Thanks

View 2 Replies View Related

Comboboxes In A Form Record...

Jul 20, 2005

Hi,

I'm pretty new to this stuff and I'm having this odd problem:

I've created a tabular form that uses a combobox for each record. The problem is that if I had, say 10 records in the form and I select a value for the combo box of one of the records, all of the combo boxes change to the same value...

Any help would be much appreciated.

TIA

View 2 Replies View Related

Comboboxes And SQL UNION QUERY

May 12, 2005

Hello,
I have set up a form which will be used for filtering reports. I would like to be able to generate a single report and in order to do that I will have to filter three fields.

I am using three combo boxes to achieve this. The three fields I am filtering are as follows: Tenant Name, Building Name, and Unit

The Tenant Name and Building Name work perfectly but I can't get the rowsource for Unit to display any values.

Here is what I have so far:

For the tenant name:
rowsource:
SELECT Tenants.[Tenant Name] FROM Tenants ORDER BY [Tenant Name];

The above displays all the tenants that currently have leases.

Once the Tenant Name is selected the Building combobox is populated with all the buildings leased to the selected tenant (Tenants can lease more than one building). This is achieved by the following:
rowsource:
SELECT distinct Leases.LeaseID, Leases.[buildingName] FROM Leases WHERE (((Leases.Tenant)=[forms]![Lease Offer]![tenantCombo])) UNION select distinct null, null FROM Leases ORDER BY Leases.[buildingName];


This also works perfectly. Only the buildings that are occupied by the tenant are displayed.

Now for my problem. Because, not only can the tenant be holding a lease in more than one building, but they can also have more then one lease in the specific building (ie for a specific Unit number). So what I am trying to do is to have the Unit combobox display only the unit numbers that the selected tenant is leasing in the selected building.

I tried to simply modify the rowsource of building name but it is not working (the combo box is always null).
rowsource:
SELECT distinct Leases.LeaseID, Leases.[Unit] FROM Leases WHERE (((Leases.Tenant)=[forms]![Lease Offer]![tenantCombo]) AND ((Leases.buildingName)=[forms]![Lease Offer]![buildingCombo])) UNION select distinct null, null FROM Leases ORDER BY Leases.[Unit];

So this is where I need help. This is very important to my project because, it is the only way I see being able to filter my report to a single specific lease.



Also, not sure if it will be useful, but I had trouble to get just the first two comboboxes working but I eventually succeeded, so if anyone is interested on how to achieve these to update here is the code:

It is only basically three functions:

'this is the "On Current" even of the form
Private Sub Form_Current()
buildingCombo.Requery
unitCombo.Requery
End Sub

'this is "On Change" event in the the tenant combo box. the building part 'works but the unit combo doesn't. However, I'm pretty sure it is a problem 'with the actual query not the code below
Private Sub tenantCombo_Change()
buildingCombo.Value = Null
unitCombo.Value = Null
buildingCombo.Requery
unitCombo.Requery
End Sub

'this is "On Change" event in the building Combobox, however it is not doing 'anything for me now.
Private Sub buildingCombo_Change()
unitCombo.Value = Null
unitCombo.Requery
End Sub


Thanks in advance for any input you might have.

Eric

View 1 Replies View Related







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