Combo Box Will Not Display Selection

Dec 14, 2005

I have a form that calculates freight costs. I'm using a combo box for the user to select the route of the shipment from shipping port to destination port. The combo box has 2 fields. The index which is stored in the database and the description which is displayed to the user. I used the wizard to create the combo box and set the index to be saved in a table. Everything works fine, the freight cost is calculated correctly and the data is stored as designed.

The problem is when if the user goes back later and opens the screen to view the freight information, the combo box doesn't display what was selected previously. Therefore, no freight is calculated and the user has to reselect the combo box again. When I check the table, the index value of what was selected is in the table, but it will not display in the combo box.

. . . . Additional info to this post. . . . The combo box is set to use a data from a standard table. The user can only select what is displayed in the list. However, the index is then stored in another table after the selection is made. I want the combo box to do something like, if a selection was previously made then displayed what was select, if not, then display the data from the standard table.

What did I do wrong during the set up? Thanks for your help solving this problem.

Jeff

View Replies


ADVERTISEMENT

Want To Display Selection Made With Combo Box

Mar 14, 2013

I have access2007 Currently i have a tabbed form on one tab i have a combo box to select names.On the following tab i have a text box which i want to display the selection made with the combo box. At first i was just getting a number on reading related issues on this forum i tried =[CMB_salesman].[column](2) unfortunately that gave no result.

View 2 Replies View Related

Forms :: Display Flag Corresponding To Selection In Combo Box

Apr 18, 2015

I'm trying to create an access database to make an inventory of my model trains.

I have a main entry form (frmTrain) where I enter all sorts of info regarding e.g. a locomotive. This info is then stored in a table (tblTrain).

In the main entry form, I've put a combo box (cmbCountries) linked to a query (qryCountries) which queries the country codes from a table (tblCountries) that has three fields:

ID (autonumber)
CountryCode (short text) (containing the country codes UK, FR, DE, ...)
FlagFile (short text) (containing the name of the flag picture, e.g. UK.png)

The flags are stored as *.png files in a folder Flags that is in the same folder as the database file. I have chosen this approach instead of putting the flag pictures in an OLE field in tblCountries because I'd like to avoid being stuck to *.bmp files (don't support transparency). I'd also like to avoid having to mention the complete file path in the field FlagFile

I created a form (frmCountries) to easily add countries to tblCountries as needed.

Now back to the main entry form. The selection made in cmbCountries is stored in the field 'Countries' in tblTrain. When a country is selected in cmbCountries, I'd like that the corresponding flag is displayed next to the combo box.

I found an example on the web where an image field was used to display the flag, let's say with the following code:

Private Sub cmbCountries_Change()
Me.ImageFieldName.Picture = Me.cmbCountries.Column(2)
End Sub

Private Sub Form_Load()
Me.ImageFieldName.Picture = Me.cmbCountries.Column(2)
End Sub

and where the combo box had as row source (not using qryCountries):

SELECT tblCountries.ID, tblCountries.CountryCode, [Application].[CurrentProject].[path] & "Flags" & [FlagFile] AS Expr1 FROM tblCountries ORDER BY tblCountries.[Code];

The problem with this example is that, if you select in frmTrain e.g. UK, the UK flag is then displayed across all records in frmTrain. So the image field is not the appropriate field to display the flag in frmTrain and I guess an unbound/bound (?) object frame should rather be used.

How to display correctly the flag picture for every individual record in frmTrain corresponding to the country chosen in cmbCountries.

View 13 Replies View Related

Display Multiple Columns In A Combo Box After Selection

Feb 20, 2013

I have a combo box that takes its record source is a Query, this all works fine and when i click on the Combo box, I see 4 columns of data but when i select the record, only the first column displays, is there a way that I can display all 4 columns in the selected combo box, or will I have to have 1 combo box and 3 text boxes to display the data, is so how would I do that.

View 2 Replies View Related

Using Expressions To Display Value In Txtbox Based On Combo Selection

Aug 2, 2007

hi Guys

I would like to write an expression (i presume) to auto fill a text box based on the selection made from a combobox...can anyone help or point me to a tutorial that deals with this??

Many Thanks,

RF

View 10 Replies View Related

Forms :: Combo Box - Project Number To Display After Selection

Dec 18, 2013

I have a combo box that display three columns but I want the middle column to be the value that displays on the combo box after the selection not the first column. How do I achieve this ?

Project Name
Project Number
Project Description

I want the Project number to be displayed in the box after selection.

View 1 Replies View Related

Forms :: Display Attachment Image Based On Combo Box Selection

Jul 13, 2013

I'm working on a wine database (for ages now...). I'm currently struggling getting the following to work. I have a form in which one can select the name and vintage of a wine using a combo box, after which also a picture will be shown of that wine. I have the pictures as attachments in a table. One can then press a button to close this form and go to another form in which one can edit all the details of the selected wine. Problem: I can't get the picture to show.

I have a reasonably simple form with a combo box, a text box, a button and an attachment field in which a picture should show.

I made a query to select the id, name and vintage from the wine table. I couldn't select the attachment field for the pic in the wizard, so I added that myself in the Design View. The Query for the combo box now reads:

Code:
SELECT Wijn.Id, Wijn.Naam, Wijn.Vintage, Wijn.Plaatje FROM Wijn ORDER BY Wijn.[Naam], Wijn.[Vintage];
(translation: Naam = name | Plaatje = picture)

It neatly shows name and vintage in the drop down list. Once selected it only shows the name of the wine in the combo box and I use VBA to fill the Text Box with the vintage of the selected wine. The VBA I use is:

Code:
Private Sub cmbNaamWijn_Change()
Me.txtVintage.Value = Me.cmbNaamWijn.Column(2)
End Sub

All works fine. Also when I pres the button, the wine I selected opens up and can be editted and the select form nicely closes. The only problem is the fact that I cannot get the picture to show!

I inserted an attachment field with the name: attImage. In the VBA code I added the line:

Code:
Me.attImage.Picture = Me.cmbNaamWijn.Column(3)

Doesn't work. With debugging I do see it gets the correct value form the table. I get an error message stating "Method or data member not found", so Picture is not available for the attachment object I guess. If I look at what is available, I can't select anything useful. So my next try was adding an image control with the name: ImageWine and the VBA code in the On Change property

Code:

Me.ImageWine.Picture = Me.cmbNaamWijn.Column(3)

results in the following: Run-time error '2220'. Microsoft Access can't open the file '[FilenamePicture]'. Logical in a way I guess, since there's no path in there. I also tried the Bound Object Frame, but that resulted in the same problem as the attachment try described above.

View 1 Replies View Related

Change Combo Contents Based On Previous Combo Selection

Oct 20, 2005

Hi everyone,

I have two combo boxes on the same form bound to a table. I want the contents of the next combo box to change based on the previous combo selection e.g

cboContinent cboCountry
Africa Zambia
Africa Congo
Africa South africa
Europe England
Europe Holland

If I choose Africa in cboContinent, I want to see only Zambia, South Africa and Congo under cboCountry and if I choose Europe I want to see only England and Holland

Thanks
Humphrey

View 1 Replies View Related

Populate Combo Box Based On Selection In Another Combo Box (Access 2010)

Jul 11, 2012

I'm have quite a difficult time getting a form in Access 2010 to perform the way I would like it to. I have multiple tables that I've created, and a query that contains the data from the various tables. I then ran the form wizard to select the data from the query that I wanted to populate in my form and I've added 2 combo boxes.

What I want to do:
1. I want users to be able to select a category in combo box #1 (example: "Bag")
2. I want users to be able to select a detail in combo box #2 based on the category they selected in combo box #1 (example: Combo box #1, "bag" would populate the following selections for combo box #2: "sandwich" and "tool")
3. I want users to then receive a list of suppliers that provide the product they have selected, either "Bag: Sandwich" or "Bag: Tool"

I have combo box #1 populating a list of categories already. However, I am not able to get combo box #2 to provide choices based on the selection chosen for combo box #1.

View 1 Replies View Related

Display Subform Based On Selection

Mar 20, 2006

A tricky one this. Searched for answer but cannot find.

Acc 2003.

I have a main menu with 2 subforms.

In the on load event it sets the source object of the first subform, which displays a list of options (menu Style).

When choosing an option from SubForm1, I want SubForm2 to display the form I have coded in.

I currently have within subform 1 in the on click event the following.

Form_MainMenu.subform1.sourceobject = "formtodisplayinsubform2"

When running this from the main menu, nothing at all happens.

When opening just the subform 1 on it's own and clicking the option, it merely opens the main menu form.

Can anyone see what I am missing?

Thanks in advance

View 2 Replies View Related

Display Fields After Listbox Selection

Oct 22, 2014

I have been working on this problem for 3 days, and can't figure out what to do. I'm using Access 2010.

I have two tables. Tier1 and Tier2.

Table: Tier1 has Tier1ID (autonumber) and Tier1Desc

Table: Tier2 has
-Tier2id (autonumber)
-Tier1ID (which is the link back to the Tier1 table),
-Tier2Num -- this number shows which tier2 records are associated with each other
- and about 6 fields with descriptive info, 2 of which are memo fields

I have a form that has 2 listboxes:

- Listbox 1 has the row source to Tier1 table, control source Tier1ID
- Listbox 2 is an unbound listbox with the row source to a query.

The query is all the fields from Tier2 with the criteria where Tier1ID in Tier2 table = Tier1ID in Tier1 table

This all works. When I select something from the Tier1 ListBox, it displays the associated tier2 items for the tier1 selection.

What I need : When the selection is made in the 2nd listbox, I need the other 6 fields in tier2 table to be displayed based on the "Tier2Num". The listbox does return Tier2Num correctly.

I just need to display all the rest of the fields.

- I tried a popup form based on a query, but can't seem to pass the tier2Num to a form. (The query works if you enter the Tier2Num, which is the
[listitem] selection)
- I tried dlookup in a textbox
- I tried to add all the fields into the listbox, but could only get 3 to display (then I was going to do textboxes with the control(#) in it.

View 7 Replies View Related

Displaying Selection-query In Form Display

Jul 27, 2005

Hello there,

perhaps it could be a fault in my PC;
though I designed a form which depends on a selection-query and when I fill in the criteria in the selction query to look for a certain record, my form display stays empty. Even empty records won't be shown.
Is this phenomenon occuring either normal in Access or is this problem related to the configurations of whether my query or relations.

It's already pissing me off the whole day,

so I would be very eager to know what's the solution,

grtz

View 1 Replies View Related

Combo Box Selection Triggering 2nd Combo Box Tables

Oct 26, 2004

I'm trying to get one combo box control what tables are available from another combo box. Example, combo box (a) includes numbers 1-5. Selecting (1) makes the data in combo box (b) specific to that selection. Selecting (2) makes the data in combo box (b) something different (pulls data from a different table).

Can anyone help me with this? Thanks!

View 1 Replies View Related

Forms :: Combo Box Value Based On Selection In Other Combo Box?

Nov 29, 2014

I'm trying to build a database for daily work. My work in daily basis I have to fill all condition for several items.

We have two areas, with two locations under each area, and three systems under each location and each system contain more than 500 items.

I created all tables and fill by all information:

1-Table 1: Area 1, Area 2, Area 3, Area 4, Area 5, Area 6.
2-Table 2: Location 1, Location 2.
3-Table 3: System 1, System 2, System 3.
4-Table 4: all items under System 1-1-1
5-Table 4: all items under System 1-1-2

[Code] ....

Last table will be LogBook which will be as follow:

date l time l area l location l system l item l Conition1 l Conition2 l Conition3

My question regarding to the form of the above table:

How can I make a combo box for area field and when I select for example area1 will appear only the locations which under area1 in location field, and when I select location1 for example will appear only the systems under location1 in system field, and when I select system1 one for example will appear only items under system 1.Combo box list will be based on the selection in previous combo box and so on.

View 3 Replies View Related

Combo Box Values Based On Another Combo Box Selection

Feb 6, 2013

I have a form, with a subform and another subform

Once a supplier name is selected from the combo box i only want it displayed that suppliers products in the subform, subform. (products combo box) I can get a basic query to show these results but can get the combo box to do the same.

The design screen is also attached below ....

View 14 Replies View Related

Combo Box Populated By Selection In Other Combo Box

Jul 13, 2013

I have a form with a number of combo boxes to select criteria in order to narrow down a list. A selection in any combo box should narrow your options in the other combo boxes.

For example:

Combo 1 is a list of all the states
Combo 2 is a list of all the cities

Selecting NY in combo 1 will change the list in combo 2 so that it only shows cities in NY

Or, selecting Rochester in combo 2 first will edit the list for combo 1 to show only states that have a city named Rochester

The point in me doing this is to be able to narrow down a list of over 230000 different but similar items by varying criteria in order to track inventory and value.

Scrolling through the whole list, typing criteria in manually each time and building new queries and reports every time I need to find something specific are not options.

I just need the combo boxes in a form to set the criteria to filter out the list in real time. Each selection made needs to narrow your options for the next selection.

View 3 Replies View Related

Modules & VBA :: Unbound Textbox To Display Memo Field Based On Listbox Record Selection

Apr 21, 2014

My table:

tblHeatTreatment
- HeatTreatmentID - PK
- HeatTreatmentDesc - Text
- HeatTreatmentDetails - Memo

My form has a listbox (lstHeatTreatments - Multi-Select disabled) that displays Heat Treatment descriptions and an unbound textbox (txtHTDetails) that I would like to have display the corresponding memo field when a description is selected from the listbox.

This is my code so far:

Code:
Private Sub lstHeatTreatments_AfterUpdate()
Dim myConnection As ADODB.Connection
Dim myRecordSet As New ADODB.Recordset
Dim mySQL As String
Dim selectedRequirementKey As Long
Set myConnection = CurrentProject.AccessConnection
Set myRecordSet.ActiveConnection = myConnection

[Code]....

When I run the code I get an error:

Quote:

Run-time error '-2147352567 (80020009)':

The Value you entered isn't valid for this field

When I debug, it highlights:

Code:

Me.txtHTDetails = myRecordSet.Fields

View 3 Replies View Related

Combo Box Selection

Jan 10, 2006

I have a form with 4 text boxes that are populated from a query with an unbound cbo box to make the choice from. There are two fields that show on the dropdown, "Customer" and "New Product Name". I created it all with wizards. Most of the Customers have only one product name but some have several. If I choose a customer that has several products, it always selects the customer with the first product it finds. How can I get it to select the Customer by product? I have looked and seen what looked like what I needed on this forum, but I couldn't make it work. I am not good a VB. Thanks in advance for any help that you can give.

View 10 Replies View Related

Combo Box Selection

Dec 13, 2006

I have had some help on this previously but its not working the way i wanted.

I have a form called plan distribution which holds a record of all people who need a copy of a certain plan. There are several hundred contacts held in the database and i want to make this as easy as possible to choose the right ones.

To do this i want to have 3 combo boxes. One each for company, department and contact.

On the plan distribution form i want the user to select which company they want. The department combo box will then automatically show all departments within that company.

Once the user selects the department, the final combo box will hold all contacts within that department.

I have tried several ways of doing this but cant find one that works!

HELP!

View 1 Replies View Related

Combo Box Selection

Jan 22, 2005

Text is brought into a form field as a result of a combo box selection, is it possible to use the same combo box to select another value that could be appended to the same field as the first selection?

View 3 Replies View Related

Combo Box Selection

Apr 4, 2005

As you have read in my other posts I am creating a Rental database. Now I need to show ages in this database and the certificates they have on films. I have 2 problems

1) I have two fields one called date of birth and one called Age. I am wondering if I enter there date of birth, can I make the age appear automatically.

2) Also when im adding more films to my database I want one combo box saying with the options DVD/VHS/GAME and then the other saying the age certificates because Game and DVD certificates are different so I was wondering if the first combo box makes the other combo boxs options

View 5 Replies View Related

Combo Restricted Selection

Mar 8, 2005

Hello,

I have Customers recorded and a number of addresses associated with each customer.

They are in two tables linked by CustomerID and are shown in forms as frmCustomers & subfrmCustomerAddresses.

From frmCustomers, I open another form which records the orders maid by that customer. What I would like on this form is to select the customer address to be used for the order.

I can build a combo, but this shows all addresses on the database. What I would like for the combo to show only the addresses for that customer only.

I do not want two combos, one which selects the customer and then another which shows the addresses. This is not very user friendly to ask for the customer again. I would like one combo to show addresses for the customer on the form.

I would be grateful for any guidance on how I can achieve this.

Thank you.

View 1 Replies View Related

Combo Box (Filter By Selection)

Jul 24, 2005

hi all,
another quick question (last one for awhile I promise) but is there a way to add an option to a combo box (Filter by Selection) and Remove/Filter sort without right clicking on it?
cheers,
Andrew

View 1 Replies View Related

Combo Box Record Selection

Aug 1, 2005

I have a Main Form
Main Form [Event],[Category],[Judge Name]
The Main Form also has a subforms
Sub1[Event],[Category],[Judge Name],[Score],[Comments]

On the main form I have a combo box that is set to retrieve records that meet the combo selection. and thus the subform is related to display the corresponding records.

In my selection combo box I see all of the various selections as follows
[Judge Name],[Category],[Event]
and it is bound to the judges name

Problem Example:
Pull Down Values
1.[Sherry],[Fitness],[Mrs. Canada]
2.[Sherry],[Swim Suit],[Mrs. Canada]

In the above when i pull down the combo box to select and I select the first example above all is wonderful ; however if i want to select the second row the [Category] and [Event] Do not change and the information i input into the subform ends up being associated to the wrong category.

How do i bind a combo box to more than one [field] on the form

I have over 50 hours into this DB to this point and this is critical.

View 1 Replies View Related

Combo Selection Comes Up WRONG

Aug 30, 2005

I have a form with combo boxes for selecting products to be purchased.

When a product is selected, the price appears in a text box. This is working fine by making the bound column of the combo box the field containing the price.

When I have two different products that have the same price, however, the combo box always displays the name of the first item of that price.

For example, a jar of Lavendar Oil costs $12 and a Small Exercise Ball costs $12. The Combo list is sorted alphabetically. When I select the Small Exercise Ball, I get the $12 in the text box, but Lavendar Oil shows up in the combo.

How do I make the combo show what I'm selecting? I assume it's something with the bound column, but can't find the resolution.

I hope someone is able to help me with this................

View 14 Replies View Related

Combo Selection Does Not Show

Aug 31, 2005

I have a combo box set up to select a product and put the price into a text box. I am getting the cost showing up in the text box Therapy_Cost just fine, but the combo box itself does not display anything after I select something. If I remove the AfterUpdate, I do get the item displaying in the combo box, but, of course, don't get the price in the text box. Here are the details. Can anyone help?

Combo Box
Name:
Therapy_Type
Control Source:
Therapy_Cost
Row Source:
SELECT Purchase_Items.ItemID, Purchase_Items.Item_Name, Purchase_Items.Item_Cost
FROM Purchase_Items
WHERE (((Purchase_Items.Item_Type)="2"));
Number of Columns:
4 (In this order - ID, Type, Name, Cost)
Bound Column:
1
Column Widths:
0";0";1";0"
AfterUpdate:
Private Sub Therapy_Type_AfterUpdate()
Me!Therapy_Cost = Me!Therapy_Type.Column(3)
End Sub

View 4 Replies View Related







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