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

ComboBox Data in a text Box

I have a form with a ComboBox with a list of users. The ComboBox is
set on a Table/Query to look up the Employee Names by their ID. The
ComboBox is named AssignedTo

If I set up a Textbox with =AssignedTo , it will just display the ID of
the Employee. How do I go about so that this box will show the name
instead?

Thanks in advance

Jul 13 '06 #1
4 2343
po******@gmail.com wrote in
news:11**********************@i42g2000cwa.googlegr oups.com:
I have a form with a ComboBox with a list of users. The
ComboBox is set on a Table/Query to look up the Employee Names
by their ID. The ComboBox is named AssignedTo

If I set up a Textbox with =AssignedTo , it will just display
the ID of the Employee. How do I go about so that this box
will show the name instead?

Thanks in advance
From your description, the combobox has two columns in the dropdown
portion. If you want to access the information in a supplemental
column, you would refer to it as AssignedTo.column(n) with n being
the sequence from left to right, starting with 0 for the first
column.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jul 13 '06 #2
Hey Bob,

That works perfectly. Now I have another problem.

I can get it work for one of the fields but not the other...

For Example, In a text field, =AssignedTo will show me a number (1 for
example), =AssignedTo.Column(1) will show me the name

But If I put inthe TextField, =Provider will show me a number (1 for
example), but when I put in =AssignedTo.Column(1), it shows #name?

I know it is something super simple... but I can't figure it out..
Bob Quintal wrote:
po******@gmail.com wrote in
news:11**********************@i42g2000cwa.googlegr oups.com:
I have a form with a ComboBox with a list of users. The
ComboBox is set on a Table/Query to look up the Employee Names
by their ID. The ComboBox is named AssignedTo

If I set up a Textbox with =AssignedTo , it will just display
the ID of the Employee. How do I go about so that this box
will show the name instead?

Thanks in advance
From your description, the combobox has two columns in the dropdown
portion. If you want to access the information in a supplemental
column, you would refer to it as AssignedTo.column(n) with n being
the sequence from left to right, starting with 0 for the first
column.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com
Jul 14 '06 #3
Just a little more detail on these fields:

They are both set to number date type (Long Integer) and Yes Duplicates
OK in Indexed, in a main table that reference their own table, Provider
and Contacts.

In the Main Table, both have this attribute:
Display Control: Combo Box
Row Source Type: Table/Query
Bound Column: 1
Column Count: 2
Column Heads: No
Column Widths: 0";1"
List Rows: 15
List Width: Auto
Limit to List: Yes

The ONLY difference is the Row Source:

The Provider is set up as:
SELECT Providers.ID, Providers.FirstName & " " & Providers.LastName & "
, " & Providers.Title AS Expr1 FROM Providers ORDER BY
Providers.LastName;

AssignedTo is set up as:
SELECT Contacts.ID, Contacts.FirstName & " " & Contacts.LastName AS
Expr1 FROM Contacts ORDER BY Contacts.LastName;

Their respective tables are set up near identical to each other, just
vital information and contact number and such..

Please help..



point...@gmail.com wrote:
Hey Bob,

That works perfectly. Now I have another problem.

I can get it work for one of the fields but not the other...

For Example, In a text field, =AssignedTo will show me a number (1 for
example), =AssignedTo.Column(1) will show me the name

But If I put inthe TextField, =Provider will show me a number (1 for
example), but when I put in =AssignedTo.Column(1), it shows #name?

I know it is something super simple... but I can't figure it out..
Bob Quintal wrote:
po******@gmail.com wrote in
news:11**********************@i42g2000cwa.googlegr oups.com:
I have a form with a ComboBox with a list of users. The
ComboBox is set on a Table/Query to look up the Employee Names
by their ID. The ComboBox is named AssignedTo
>
If I set up a Textbox with =AssignedTo , it will just display
the ID of the Employee. How do I go about so that this box
will show the name instead?
>
Thanks in advance
>
From your description, the combobox has two columns in the dropdown
portion. If you want to access the information in a supplemental
column, you would refer to it as AssignedTo.column(n) with n being
the sequence from left to right, starting with 0 for the first
column.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com
Jul 14 '06 #4
The #name error indicator is usually caused by one or the other
of the following problems, 1) a typographical error in the name
of the referenced control, 2) a circular reference between a
text/combo/listbox contrrol and the name of a field in hte
recordsource of the form.

Bob
po******@gmail.com wrote in
news:11**********************@m79g2000cwm.googlegr oups.com:
Hey Bob,

That works perfectly. Now I have another problem.

I can get it work for one of the fields but not the other...

For Example, In a text field, =AssignedTo will show me a
number (1 for example), =AssignedTo.Column(1) will show me the
name

But If I put inthe TextField, =Provider will show me a number
(1 for example), but when I put in =AssignedTo.Column(1), it
shows #name?

I know it is something super simple... but I can't figure it
out..
Bob Quintal wrote:
>po******@gmail.com wrote in
news:11**********************@i42g2000cwa.googleg roups.com:
I have a form with a ComboBox with a list of users. The
ComboBox is set on a Table/Query to look up the Employee
Names by their ID. The ComboBox is named AssignedTo

If I set up a Textbox with =AssignedTo , it will just
display the ID of the Employee. How do I go about so that
this box will show the name instead?

Thanks in advance
From your description, the combobox has two columns in the
dropdown portion. If you want to access the information in a
supplemental column, you would refer to it as
AssignedTo.column(n) with n being the sequence from left to
right, starting with 0 for the first column.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com


--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jul 14 '06 #5

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

Similar topics

3
by: Wayne Wengert | last post by:
I am trying to populate a combobox with a lisy of items. I want the 1st item to be "Make a Selection" and the following items will be names from a table in my DB (See code below). When I run the...
3
by: PeterZ | last post by:
G'day, After doing much searching and pinching bits of ideas from here there and everywhere I came up with a fairly 'clean' solution of including a comboBox into a dataGrid column. You can...
0
by: Doug | last post by:
This is a repost of an item that I still cannot resolve. I have 3 combo boxes. The first leads to the second to the third. When I have selected a value in the second box, the third box shows...
30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
4
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box...
6
by: Matt | last post by:
I'm not entirely sure how to describe this issue. I have a number of ComboBoxes in my application which have their text properties bound to a field in a data set. The items loaded in the ComboBox...
6
by: dbuchanan | last post by:
VS2005 I've been reading all the help I can on the topic (MSDN, other) but I can't make sense of this. Desired behavior; The user is to choose from the displayed list of the databound combobox...
1
by: fiaolle | last post by:
Hi The first set of source code is the class for a combobox in a grid, hopefully. In the second set of code we try to use the combobox class, but the grid is empty. I don't understand how this...
0
by: Frnak McKenney | last post by:
Can I use a bound ComboBox for both browsing and editing? I'm working on a small, standalone database application using Visual C#.NET 2003 and an Access data file. In order to keep the number...
12
by: Gerhard | last post by:
This is bizarre... Im having problems with the combobox AfterUpdate event: Im running Access 2003. I created an unbound combobox with 3 columns on a form. The Row Source is from a table....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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...
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
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...

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.