473,320 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Drop Down Box Problem

I need to use a drop down box based on table Color that, once you click on a value, populates the field in my form

In the main database design, I reference the Table Color, both the ID and the description. For the description field, I ran the lookup wizard, refering to the Table Color, Selecting just the Color field (not the ID).

The display control is a combo box (default by access), with row/source type of Table/Query, and row source
SELECT Color.ColorID, Color.Color FROM Color OREDRE BY [Color]
Bound Column is 1, with Column Count of 2.

BUT when I open the form, the color description field was blank. The properties on that are:
Control Source ColorDesc
Row Source Type: Table/Query
Row Source is blank
Validation Rule and Text are blank

So, two issues: First, obviously my drop down list is not working.
Second, I want it to save the value I click in that form once the list works.
Dec 14 '07 #1
1 2002
puppydogbuddy
1,923 Expert 1GB
To fix your combobox, go to the row source property and click the build button(the one with 3 dots) on the right. This should take you to the query grid. You will see that there is no description because the lookup table for description needs to be added to the grid. Click the add/show button, select the lookup table, and add it to the table area of your grid. Then drag the description from the lookup table to the field area of your grid next to the ID. Make sure the show box is checked. Save and go back to property sheet; set col widths property to 0";2".

To fix your testbox for Color Description, set its control source to the color description field in your table, and place the following code behind your form:

Private Sub YourCombo_AfterUpdate()
Your other code ..........
Me!Color = Me!YourCombo.Column(1)
End Sub
Dec 14 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

46
by: Kingdom | last post by:
In my data base I have a list of componet types e.g. type A - I have 8 off - type B I have 12 off etc. I'm using Set objRS = objDC.Execute("Select DISTINCT Component_Type FROM Parts_Table") ...
6
by: PT | last post by:
I got a form with many text boxes, checkboxes and 3 drop downs. From that 3, 2 are dependant. I can choose one drop down, and the next drop down should display the dependant values of the first...
2
by: ehm | last post by:
I am working on creating an editable grid (for use in adding, deleting, and editing rows back to an Oracle database). I have a JSP that posts back to a servlet, which in turns posts to a WebLogic...
3
by: KK | last post by:
Drop-down menus are the hottest thing since Wonder Bread but . . . 1. Alot of people put them in the they-look-nice-but-you-cant-code-them-right-so-they-always-look-messed-up category (a la...
4
by: Terren | last post by:
I need to be able to edit a drop down box is asp. On my web app I populate a drop down box from a databse. The user can then select an option that will then be saved to a Database for example Mr...
4
by: simon.cigoj | last post by:
I have an javascript made menu and some forms with the dropdown element. When the menu opens and scrolls down the drop down is displeyed over the menu and obscures the menu choices. I have this...
13
by: Leszek Taratuta | last post by:
Hello, I have several drop-down lists on my ASP.NET page. I need to keep data sources of these lists in Session State. What would be the most effective method to serialize this kind of data...
5
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
string connectionString1 = "server=(local); user=sa;password=sa; database=sonic"; System.Data.SqlClient.SqlConnection dbConnection1 = new System.Data.SqlClient.SqlConnection(connectionString1);...
1
by: Capitan Catarro | last post by:
Hi everybody, I have a little problem with drop down menus. I have a PHP page in which I extract some categories (from a database). I put those categories in a drop down menu without problems. I...
3
by: jcassan | last post by:
Hello folks. I am new to these forums and have something, which has been stumping me for little while. I am using pspell to spellcheck a scrolling textbox (textarea) containing user input. I...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.