473,426 Members | 1,559 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,426 software developers and data experts.

Combo-Box Problem.

Can anyone help with the following problem? The solution will likely
be elementary to many members of this newsgroup, but, Duh! I've been
struggling to find it all day.

On an Access 2000 form I'm designing, there is a combo-box for the
names of 535 Members of Congress. The Recordsource is a table. The
Autoexpand property is on. When I enter the first few letters of the
last name, the field fills beautifully.

My problem: How can I include additional information - such as phone
number and congressional district - from the underlying table either
in the combo box or as separate fields on the form? I've spent hours
with reference books on this. Any ideas?
Nov 12 '05 #1
2 1395
da************@verizon.net (David Savageau) wrote in
news:b2**************************@posting.google.c om:
Can anyone help with the following problem? The solution will
likely be elementary to many members of this newsgroup, but,
Duh! I've been struggling to find it all day.

On an Access 2000 form I'm designing, there is a combo-box for
the names of 535 Members of Congress. The Recordsource is a
table. The Autoexpand property is on. When I enter the first
few letters of the last name, the field fills beautifully.

My problem: How can I include additional information - such as
phone number and congressional district - from the underlying
table either in the combo box or as separate fields on the
form? I've spent hours with reference books on this. Any
ideas?

This is so simple. Use the combobox wizard.

If you want to do it manually, look at the combobox properties,
specifically the ones named column count, column widths and
rowsource.

BTW,

Bob Quintal
Nov 12 '05 #2
da************@verizon.net (David Savageau) wrote in message news:<b2**************************@posting.google. com>...
Can anyone help with the following problem? The solution will likely
be elementary to many members of this newsgroup, but, Duh! I've been
struggling to find it all day.

On an Access 2000 form I'm designing, there is a combo-box for the
names of 535 Members of Congress. The Recordsource is a table. The
Autoexpand property is on. When I enter the first few letters of the
last name, the field fills beautifully.

My problem: How can I include additional information - such as phone
number and congressional district - from the underlying table either
in the combo box or as separate fields on the form? I've spent hours
with reference books on this. Any ideas?


There have been recent posts about this very topic. You need to
choose whether to use bound or unbound controls on the form. Since it
seems you only need to view the information there's not much
difference in the effort required to do either. For unbound, open a
recordset with a SQL string that finds the congressperson listed in
the combobox and assign the values to the unbound textboxes on the
form. A good place to put this code is in the AfterUpdate Event of
the combobox. The assignment looks something like txtDistrict.Value =
MyRS("District"). Most people in this NG would use a combobox with
two fields (columncount = 2) having the second field as the bound
column and the Primary Key of tblCongressMembers as the first field.
The ColumnWidths would look something like 0";3.5" to hide the Primary
Key. Then the SQL string could use the combobox.Column(0) value to
look up the correct congressperson using the Primary Key. Many people
in this NG prefer the bound approach. It does have some advantages,
particularly of binding people to Microsoft :-). Seriously, binding
the values using the RecordSource of the form can often be implemented
using less code but the more the tables get bound to forms the more
likely it is that you will run into conflicts when updating values.
Access is fully capable of handling both techniques. I'll let a
stronger proponent of bound controls explain their position if you
don't find what you need from recent posts.

James A. Fortune

I pay my employees just enough so they don't quit. The problem
is they do just enough so they don't get fired.
--- Tire Store Manager
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Harry Haller | last post by:
<select name="cboPlaces" id="cboPlaces"> <option value="3">Countryside</option> <option value="4">Forest</option> <option value="5">Mountain</option> <option value="6">Desert</option> <option...
1
by: Tina McGibben | last post by:
I basically have a form with a subform with two combo boxes on the main form which filter the subform. The code below works except I cant seem to get it to show all the worksheets when there is...
8
by: bbdata | last post by:
ok i have a problem here and not much time to play round. have a form bound to a table. one of the combos is bound to a field Agents. i have active and retired agents. thing is, i want to be able...
2
by: Al | last post by:
hi,I am using asp.net(vb) I am trying to create 3 combo boxes which are dependable on each other. when comb1 is selected, it shows the comb2 data based on the selection in combo1 and when combo2...
1
by: Alejandro González | last post by:
Hi I have a combobox binded to a Datatable something like combo.DataSource = dt.DefaultView; combo.DisplayMember = "descField"; combo.ValueMember = "valueField"; it works fine.
8
by: AA Arens | last post by:
Hi I do have a products table and products-parts table in my Access 2003 database and log all services into a form. I do have at least the following two combo boxes on my form: - Choose...
3
by: John | last post by:
AC2007 I changed my combo's row source and then the autocomplete stopped working. The combo is two columns, bound to the first. First column is primary key (ID). Second column is a...
2
by: Ruthenfods Tellez | last post by:
I have an application in asp; in my form I have a combo and a textbox, the combo is fill in from a database query. I cannot do the following: when selecting an item from the combo, it should send...
0
by: Jeff | last post by:
I don't remember this being that hard. Or maybe it's just early senility. On a simple bound continuous form I have a combo for filtering the form by customer. The form record source is a sql...
4
by: User | last post by:
Hi people, Excuse if my question is silly, but... i have 2 combo boxes in my project they are binded to fields from same table... one is binded do Code field and another to Description field...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
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
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.