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 Replies


ADVERTISEMENT

Forms :: Display Data In Multicolumn Combobox

Jul 7, 2015

I have a main form and a several subforms. The main form displays potential customer data and 1 of the subforms displays the advertisement that prompted that customer to call. 1 of the Advertisements is newspaper ads and for that one we want to track which newspaper.

The subform has 3 pieces of data. The advertisement type, advertisement date and a hidden field for the customer ID to link those to the appropriate customer. There is also a requirement for a field for the advertisement source for newspaper ads.

Data Structure:
Customer Table
CustomerID
Customer demographic data as fields

Advertisementtype
AdvertisementTypeID
AdvertisementType

SpecificAdvertisement.
SpecAdvID
Advertisementtypeid
advertisementdate
advsource

sample data
Customer
1
John
Smith
1234 some st
somecity
somest
somezip

Advtypes
1 google
2 Newspaper
3 Radio

specificAdv
2
7/7/2015
Daily Press

I have a combo box that gets the advtype Then another combo box that gets the adv date the issue I'm having is I also need the source and If I put it in the combo box it only displays when that combobox has the focus otherwise only the date shows. If I try to use a textbox to display the data I can only get the firstcolumn in the combobox and not the column I want. If I use the same query the combobox uses but only having the source in the select criteria I get the same data for every record. Since there are multiple advertisements and a customer could reply to any of them or all of them.

View 1 Replies View Related

Modules & VBA :: Reversing Rowsource Order For A Multicolumn Listbox

Dec 9, 2014

I have a 3 column list box in the format:

A1 A2 A3
B1 B2 B3
C1 C2 C3

The rowsource for this contains A1;A2;A3;B1;B2;B3;C1;C2;C3

I want to reverse the order so I have

C1 C2 C3
B1 B2 B3
A1 A2 A3

Which would give a row source of C1;C2;C3;B1;B2;B3;A1;A2;A3

View 10 Replies View Related

Tables :: Unique Multicolumn - Avoid Duplicate Records

May 28, 2014

I have 3 tables

tbl1 :
NameID
Name

tbl2 :
CatID
Category

tbl3 :
ProdID
CatID
NameID
Remarks

How can I avoid duplicate records in tbl3? Since remarks can be Null? product is later used in tblInventory...

View 1 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

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

Cascading Comboboxes Problem

Dec 17, 2005

Hi!
I want to use cascading comboboxes but when i'm setting criteria for second combo box, the "combo box form value" is not visible. i've tried to use the same names as in example form. It didn't work.
I have always the window asking for value of the parameter.
What should i change ?

Thank's for any help

View 1 Replies View Related

Question: Using A Form With ComboBoxes

Dec 19, 2005

Hi,

I have read a few threads about comboBoxes and what-not, but I guess I'm just having trouble relating the answers to my particular problem. I've done a semester of Access at Uni so I'm a little versed in SQL and basica database theory, and am really just after a point in the right direction as to how to accomplish this:

I have a friend who is sort of like a maintenance worker for a number of places around my city. He wants a database made up which allows him to quickly and easily make a report on the day's/week's/month's jobs he has completed.

Basically, the information in the report should be Premise (the particular building the job was done in), Location (the room in the building), Item (the 'thing' that maintenance was done on), Job Type (eg. Repair, replace, purchase etc), Date and Time.

Ok, so that's the information he wants, and here's how he wants to enter it:

He wants some kind of form which contains a drop box (or combo box) full of the various Premises, and once he highlights the Premise, a second drop box branches out (I think this is what's called a cascading drop box? Maybe not...) which allows him to highlight the Location, then a 3rd allows him to select the Item, and finally the Job Type. Once he selects these things, he wants to be able to type in the date and time, and save the information in a Latest Jobs table.

So in the end, he wants to bring up the Latest Jobs table at some point, and make a report from it. But, once he's made the report, he wants to have the Latest Jobs table append to an All Jobs table, and then clear itself ready for the next wave of Jobs.


So that's the situation, thanks for reading if you got this far :P

I'm not expecting a giant solution to the entire problem, I'm just looking for some tips and strategies on how to acheive this, and some elements of Access I should research in order to help.

Thanks a lot,
Liam

View 2 Replies View Related

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

Autofill From Cascading Comboboxes

Oct 2, 2006

Hello Again

I've searched the forum but can't quite find what I'm looking for.
I have one main table (tblFOBData) with the fields Material, MarketCode, Vendor and Cost.
I also have a form that uses the Material and MarketCode fields in cascading combo boxes and this works fine,
However,
If you select a Material and MarketCode it will only return a single record and so I would like to autofill the data from the other two fields on to the form, preferebly without using a subform is this possible

Thanks again

View 1 Replies View Related

Filter By Multiple Comboboxes

Dec 4, 2006

Hi,
I have a form with a subform on it. Also contained on the form are 5 comboboxes that are listing the entries in each table.

What i would like to be able to do it select an entry in any of the comboboxes and that will in turn filter the subform on the selections made whilst also filtering the remainder comboboxes based on a selection made.

I can get it to work by filtering one at a time with this code bound to each combobox:

Private Sub cmbAisle_AfterUpdate()
Me.qryAllData_subform.Form.Filter = "[Aisle]='" & Me.[cmbAisle] & "'"
Me.qryAllData_subform.Form.FilterOn = True
End Sub

But each time i select an entry in another combobox it re-filters on that selection.

Any Help would be much appreciated.

Dazz

View 1 Replies View Related

Hello! Needing Help With Comboboxes And List, Please!!

Dec 12, 2006

Hi! Let me explain my little problem:confused::
I have in a form two comboxes an a listbox. On the first combobox you can introduce the TAG, on the second one a machine. I need that the listbox show the values of the first and second combobox separated by a comma.

The first combobox= TAG
The second= machine
listbox=TAG machine value together without using the table

If you can help me I will appreciate your information:D

View 2 Replies View Related

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 3 Replies View Related

Forms :: Using ComboBoxes To Hide IDs

Jul 20, 2014

I usually use ComboBoxes to show a user-friendly name instead of an ID. For example, I would use a ComboBox of EmployeePK, FirstName + " " + LastName and set the first column as the control source but with 0" width.The issue is these are supposed to be read only. I can prevent the user from changing the field but I don't have a good solution for hiding the ability to select the drop down.

My current method is to create a transparent box over the combobox (so it can't be selected) then hide the dropdown arrow with a background colored rectangle.

View 1 Replies View Related

Forms :: Two Comboboxes Don't Affect Each Other

Mar 12, 2013

In my database you can search on either number or name. I have therefor, two combo boxes. and it works well, except that...

When I pick by number first, and then try to pick another record using the name combobox, the number combobox still shows the first search I did. I would like the two comboboxes to interact with each other...

View 2 Replies View Related

Forms :: Cascading 2 Comboboxes From Another

Feb 12, 2015

I am trying to get get 2 comboxes to refresh from one when cascading. The first combobox (Location) works, but the second one (Catches) doesn't. All I get are the Key values of the catches rather than the values...

I am wondering if it my relationship set up of if my VBA needs to be altered to accommodate the requering the two comboboxes.

Code:
Private Sub cboCategory_AfterUpdate()
Dim sCatchLocation As String
Dim sCatch As String
sCatchLocation = "SELECT [tblLocation].[Location_ID], [tblLocation].[LocationCategory_ID], [tblLocation].[Location] " & _
"FROM tblLocation " & _

[Code] .....

View 9 Replies View Related

Cascading ComboBoxes And Text Boxes

Mar 3, 2005

Well first i'd like to say hi to hopefully all the good people out there who can help me.

My problem is this, i've searched through the forums and cant seem to find the right solution to what i'm looking for.

I've used the instructions to construct my cascading combo boxes in the form, now all i want is the 3rd and last of the combo boxes, once selected to automatically insert the corresponding Name in the text box below it.

The text field is bound as its need in the table.

The last combo box selects the code and the field i want to show is the data name in the text box that matches the code in the combo box.

I know its something to do with the AfterUpdate event in the combo box but dont know what code to use.

Hope someone can help me. Thanks in advance

Chris

View 2 Replies View Related

Cascading ComboBoxes & Continious Forms.

May 5, 2005

I think I've solved a method to have cascading comboboxes on a continous subfrom.

The after update on the first box sets the query the drives the secondbox's rowsource, and blanks out all the boxes below it. And so on.


Dim EventTP As String
EventTP = Me.cbxClass1
Me.cbxClass2.RowSource = "SELECT distinct Class2 FROM tblEventTypes WHERE (((class1)='" & EventTP & "'));"
Me.cbxClass2 = ""
Me.cbxClass3 = ""
Me.cbxClass4 = ""


All of the comboboxes are fed by one table.

Comments?

View 1 Replies View Related

Synchronizing 2 Comboboxes (not The MS Northwind Style ...)

Sep 26, 2005

Hi There,

I want to synchronize 2 comboboxes (actually 3, but let's start with 2)

On a form I have 2 comboboxes:

- CompanyType (FK fkCompanyTypeID in table Contacts)
- Category (FK fkCompanyCategoryID in table Contacts)

Let's say we have companytype CT1 until CT10.

For CT1, CT2 & CT3 I want to choose a catagory, so the combobox must be 'enabled'.

For CT4 until CT10 the Catagory combobox must be disabled, so that I cannot choose a category value.

Actually I want to choose 2 catgories (2 comboboxes) for CT1 until CT3.
But I think that an explanation for the example above is sufficient for me.

Both comboboxes are filled by a Select Query, and the values are filled in a separate table. (Table CompanyType (PK pkCompanyTypeID) & Table CompanyCategory (PK pkCompanyCategoryID)).

Can someone please help me on this issue? :confused:

Thanks in advance for your reply,

Greets,

Quinten

View 7 Replies View Related

Using Comboboxes To Spellcheck And Protect Bad Data?

Jun 11, 2006

I'm trying to make my database easy as possible for everyone to use while protecting against potential typos and the likes. I then had an idea and wanted to make sure if that was in line with accepted practices everywhere else. After all, just because you can do it, doesn't mean you should.

Would it be reasonable to have fields that would likely to have repeating data across various records to be a comboboxes. The fields I'm thinking of are City and ZIP code, which I would start with some more common ones, and allow users to add new ones while having the benefit of auto-expand as spell checker and reduce possiblity for bad data.

I'm not sure what ramifications that may have on forms beyond the fact that more lookup tables=slower database, especially over the network.

So would you want to make city or zip code or other similar fields combobox instead of a bound textbox?

View 4 Replies View Related

Queries :: Comboboxes - Filtering Subform

Jun 5, 2013

I have a username combobox and a number combobox filtering a subform. If there is a userName but no number I want to pull all the records for that userName regardless of number and vice versa with a number and no userName. And if they both have something then both are being used for the filter.

I have been trying iff statements and isnull in query criteria and cant seem to find what I need.

View 1 Replies View Related







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