473,830 Members | 2,199 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1677
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
278
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 the data adapter ad selecting generate dataset.
5
1297
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. I'm using the Northwind DB to teach myself. I used the data form wizard to create a form with a dataset containing the 'Orders' and 'Order Detail' tables. The 'Orders' fields are displayed
2
3510
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 back, I am able to grab this value using Request.Form. This worked well until I realized that I needed the initial value in some cases. How do I access this value from the page.aspx file?
2
1333
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 employees table to fill in the reportsto field, but since a person can't report to himself. I'm wondering how to exclude the EmployeeId of the selected record from the dropdown list of the combox. Ideally I think it would be to apply a filter to...
2
10302
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 given column. We are also using another dropdown menu that the user can use to select data using another quesry using the SelectedIndex change method. Upon initial page load everything works fine and the user is presented with a SharePoint type menu....
5
2538
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 have looked all over and cannot find the list of values to edit. 2 I created a 1 column table to use as my drop down box and it works fine except when I am hitting tab through the form I would like the first row value to be highlighted when I tab...
3
1588
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 "pg_3_resource_forecast". When an item is selected in the dropdown list, I want the textbox to display the result. As of now, it does display the results, but it displays numerous copies of the same result. Example: Dropdown Selection = Auditor1
2
2191
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 dropdown. When the data is posted I take the administrator to a page where all users can be viewed. I then allow the administrator to select a user in the list that they would like to edit. The administrator is taken back to the add user form, but the...
5
6667
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 according to selection made in first dropdown list and it will also come from ms-access database.(for example if i am selecting country as india in first dropdown list then in second dropdown list will show states of india) the problem is that i...
0
10774
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10489
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10525
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10202
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9314
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7746
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5617
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4411
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3959
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.