473,836 Members | 1,401 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

combox dropdown box on data access page help

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!



Nov 13 '05 #1
1 1678
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:
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

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



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

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.
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
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?
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...
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....
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...
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
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...
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...
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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...
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...
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...
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
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
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.