473,420 Members | 4,530 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,420 software developers and data experts.

Trougble with Combo Box

Hello,

I have a form that I would like to auto-populate text boxes in based on the selection made from a combo box. I have set the form record source to a table "SubmittedTo" which contains 3 fields (4 including the ID). The fields are Name, Website and Type. I want to select the Name from a combo box and have the website and type text boxes populate with the corresponding information.

I have tried creating the combo box from the tools menu but I have run into problems with it either not allowing me to actually select an item form the list or when I do select one and then go back to design it is overwriting the 1st record.

I have also tried creating it first as a text box form the field list for the form, then changing it to a combo box. The text boxes are also created from the same field list. Once I change the Name text box to a combo box it displays only the first record. When I leave it as a text box I am able to scroll through the records and all the fields change properly.

Any help you can provide would be greatly appreciated. I feel like I am spinning my wheels and I have not been able to find any documentation to assist with this particular problem. Incidentally I am far removed from coding (and that was in Perl) so I am a bit behind the curve on manually entering code.

Thanks,
Doug
Feb 5 '08 #1
6 1755
ADezii
8,834 Expert 8TB
Hello,

I have a form that I would like to auto-populate text boxes in based on the selection made from a combo box. I have set the form record source to a table "SubmittedTo" which contains 3 fields (4 including the ID). The fields are Name, Website and Type. I want to select the Name from a combo box and have the website and type text boxes populate with the corresponding information.

I have tried creating the combo box from the tools menu but I have run into problems with it either not allowing me to actually select an item form the list or when I do select one and then go back to design it is overwriting the 1st record.

I have also tried creating it first as a text box form the field list for the form, then changing it to a combo box. The text boxes are also created from the same field list. Once I change the Name text box to a combo box it displays only the first record. When I leave it as a text box I am able to scroll through the records and all the fields change properly.

Any help you can provide would be greatly appreciated. I feel like I am spinning my wheels and I have not been able to find any documentation to assist with this particular problem. Incidentally I am far removed from coding (and that was in Perl) so I am a bit behind the curve on manually entering code.

Thanks,
Doug
We'll take it from scratch and see what happens. Assuming your Table looks like:
Expand|Select|Wrap|Line Numbers
  1. ID    Name       Website    Type
  2. 1    One      123         A
  3. 2    Two      456         B
  4. 3    Three      789           C
  1. Create a Combo Box on your Form and Name it cboSubmitted
  2. Select Properties ==> Data Tab
    1. Row Source Type = Table/Query
    2. Row Source = SubmittedTo
    3. Bound Column = 1
  3. On the Format Tab
    1. Column Count = 4
    2. Column Widths = 0;1;1;1 'can readjust if necessary
  4. Create 3 Text Boxes on your Form and Name them: txtName, txtWebsite, and txtType
  5. In the AfterUpdate() Event of the Combo Box, place the following code:
    Expand|Select|Wrap|Line Numbers
    1. Private Sub cboSubmitted_AfterUpdate()
    2.   Me![txtName] = Me![cboSubmitted].Column(1)
    3.   Me![txtWebsite] = Me![cboSubmitted].Column(2)
    4.   Me![txtType] = Me![cboSubmitted].Column(3)
    5. End Sub
  6. Any problems, let us know
Feb 5 '08 #2
Thank you very much, I will give that a try and let you know if it worked.

Doug
Feb 5 '08 #3
That worked perfectly. Thank you again....
Feb 5 '08 #4
ADezii
8,834 Expert 8TB
That worked perfectly. Thank you again....
You are quite welcome.
Feb 5 '08 #5
Hi, I am having similar issues like the user before; I have tried your solutions but i must be doing something wrong as it is not working.
I am on a beginner level with access; can someone please guide me through?

I am filling in a "Purchases" table via a "Purchases" form. In the form, I have a combo box which selects the "Supplier Name". I want another corresponding text box to be populated with the supplier Id (Both supplier name and ID comes from the supplier table), which then gets transferred onto the Purchases table.

Can someone please guide me; I have spent over 1 day wrecking my brains, trying all different codes. I must be doing something wrong that a simple thing like this is not working.
Feb 27 '08 #6
ADezii
8,834 Expert 8TB
Hi, I am having similar issues like the user before; I have tried your solutions but i must be doing something wrong as it is not working.
I am on a beginner level with access; can someone please guide me through?

I am filling in a "Purchases" table via a "Purchases" form. In the form, I have a combo box which selects the "Supplier Name". I want another corresponding text box to be populated with the supplier Id (Both supplier name and ID comes from the supplier table), which then gets transferred onto the Purchases table.

Can someone please guide me; I have spent over 1 day wrecking my brains, trying all different codes. I must be doing something wrong that a simple thing like this is not working.
sriya000, I realize that you are new, but cutting into someone else's Thread in this manner is not an acceptable practice. Kindly create a New Thread with an appropriate Title, post all the relevant information with particular attention to details, and I'm sure one of us will get back to you in a timely fashion. Thank you.
Feb 27 '08 #7

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

Similar topics

3
by: vgrssrtrs | last post by:
<html> <head> <script language="JavaScript"> <!-- /* *** Multiple dynamic combo boxes *** by Mirko Elviro, 9 Mar 2005 *** ***Please do not remove this comment
4
by: Heather | last post by:
Hi I am desparately looking for advice in relation to storing the results after selecting items from two combo boxes on a Referral form. The first combo box 'ctl Type' displays a full list of...
2
by: Jeff Mason | last post by:
I'm observing some strange behavior when I use a bound combo box in conjunction with the combo's anchor property. I define a form which contains just a textbox and a combo box. The text box is...
3
by: hmiller | last post by:
Hey everyone, I am having a hell of a time trying to set this menu system up. Here's what I'm trying to do. Combo Box One; is populated by names under properties "row source" "Phase 1"...
9
by: Edwinah63 | last post by:
Hi everyone, Please let there be someone out there who can help. I have two BOUND combo boxes on a continuous form, the second being dependent on the first. I have no problem getting the...
2
by: kiranmn75 | last post by:
I want to dynamically populate a combo box through javascript. Data is coming from a array. Sometimes data list may contain items in excess of 2000. Explorer takes more than 5 seconds to...
6
by: Dave | last post by:
I want to put the information that the user selects in my combo boxes into a subform that lies on the same form as the combo boxes. Thanks for your help already, Dave
2
by: biganthony via AccessMonster.com | last post by:
Hi, I decided to install Office 2003 Service Pack 3 on my home computer to test (in full knowledge that there may be some issues with it). After installation, I have noticed that with a small...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.