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

combox dropdown box on data access page help

jvb
Hello,
I have got the following problem.
I have an access database with the name of different persons and there
telephone numbers.
In an access page you can display the field name and the telephone number.

What i want to do is a combobox in wich you can select the name and the the
right telephonenumber has to be shown!

I CANT FIGURE IT OUT HOW TO DO THIS. IT LOOKS SIMPLE BUT ........

WHO CAN HELP ME!
THANKS

Nov 13 '05 #1
1 1646
A combo box can show multiple colums (set Format/Column Count to x).

If the Data/Row Source is set directly to a table, then that will display
the first x fields of each record.
If it looks ugly you can change the width of each column by setting
Format/Column Widths to something like 3;1.5;whatever.
By the way, you can set the column width to zero to hide the field value,
but it will still be available - see later.

If the name and telephone number are not the first two fields in the
table, then you have to (a) create a query which picks out only those two
fields and use that as the Row Source, or (b) write an SQL statement in
the Row Source to do the same thing: something like Select [Person Name],
[Telephone Number] from MyRecordset order by [Person Name].

To fill text boxes when someone choses a person from the list you have to
write a bit of code in the combobox Click event.

Something like

txtPersonName = MyCombo
txtTelNo = MyCombo.column(1)

Note that here the Bound Column of MyCombo must be set to 1, and that is
the same as saying MyCombo.Column(0) - confusing isn't it?

As I said before, you don't actually have to display the telephone number
field in the combobox; by setting the column widths to something like 1;0,
the second column will be hidden, but the MayCombo.column(1) business will
still find the correct value.

On Tue, 12 Oct 2004 22:48:58 +0200, jvb <no****@nospam.nl> wrote:
Hello,
I have got the following problem.
I have an access database with the name of different persons and there
telephone numbers.
In an access page you can display the field name and the telephone
number.

What i want to do is a combobox in wich you can select the name and the
the
right telephonenumber has to be shown!

I CANT FIGURE IT OUT HOW TO DO THIS. IT LOOKS SIMPLE BUT ........

WHO CAN HELP ME!
THANKS


--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 13 '05 #2

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

Similar topics

8
by: Kris Rockwell | last post by:
Hello, I have done the following to bind data to a DropDown box: 1. Drag SQLServer table onto web form to create data connection and data adapter. 2. Generate dataset by right-clicking on...
5
by: Greg McKnight | last post by:
This may be the second time this post is showing, I accidentally shut down my browser. Sorry if it is a repeat. I am a newbie to VB.net, so please forgive me if these are simple questions. ...
2
by: Brenden Bixler | last post by:
I have a user control, dropdown.ascx Inside dropdown.ascx, I have a dropdownlist control. From my page.aspx, I need to be able to access the dropdown's value. By setting it to auto-post...
2
by: Bob | last post by:
The scenario is that of the employees table wherein there's an EmployeeId and a ReportsTo field in the same table. The combobox is one in a datagrid view that lets you select an employee from the...
2
by: William Youngman | last post by:
We are developing an application that presents data to the user in a gridview and we are using the dropdown extender to give the user a SharePoint 2007 type dropdown menu attached to the cells of a...
5
by: Kassad | last post by:
Two questions: 1. There is a dropdown box that has a whole bunch of values but it is not linked to a recordsource. I believe when this object was created the values were manually enterred but I...
3
by: kandisbarr | last post by:
Please help! I'm new to TheScripts ... I've been stuck on this problem for days and I've lost my mind because of it! I have created a Data Access Page, using Access 2003, named...
2
by: bdbeames | last post by:
Ok, It has been one of those days. Here is my bump in the road. I have an add user form for the administrator. The administrator enters name, password and then selects access level from a...
5
by: abhi3211 | last post by:
i am using java inside java script page. in that page i want to use two dropdown list. in first dropdown list i am getting data from ms-access database. in second dropdown list i want to get data...
1
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: 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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.