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

Lookup table in a Label

I have a form that contains a field that is a Foreign Key (UserID)
I want this control to have a "label" appearance but I want it to act as a
lookup table (SelectedValue = FKID, SelectedText = "Joe Blow"). Using a
ComboBox control is the only way I've found to do this (and its actually
really easy) but I haven't found a way to disable everything and make that
combo box just look like a standard label. The label control doesn't seem
to have any of the data binding I need.

Thanks,
Ryan
Jul 13 '06 #1
3 1822
Hi Ryan,

Thank you for your post.

Based on my understanding, your question is how to bind a Label to data
source and have it show the text with a field, while saving another field
in its state which will be used to lookup other data. If I've misunderstood
anything, please feel free to post here.

In VS2005, you can use Label's built-in databinding feature to do this:
1) Add a Label, open its properties window
2) Look for "(DataBindings)", expand it, click the "..." of "(Advanced)",
this will open its databinding dialog
3) In the "Common" category, there're two properties, "Text" will be used
to display a field that user can see, for example "UserName"; "Tag" will be
used to store another field can be used to lookup, for example "UserID".

Hope this helps. Please feel free to post here if anything is unclear.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 14 '06 #2
Walter,

Thanks I was wondering if the Tag databinding was what I was looking for.
Looks like it is.

Ryan

"Walter Wang [MSFT]" <wa****@online.microsoft.comwrote in message
news:p3**************@TK2MSFTNGXA01.phx.gbl...
Hi Ryan,

Thank you for your post.

Based on my understanding, your question is how to bind a Label to data
source and have it show the text with a field, while saving another field
in its state which will be used to lookup other data. If I've
misunderstood
anything, please feel free to post here.

In VS2005, you can use Label's built-in databinding feature to do this:
1) Add a Label, open its properties window
2) Look for "(DataBindings)", expand it, click the "..." of "(Advanced)",
this will open its databinding dialog
3) In the "Common" category, there're two properties, "Text" will be used
to display a field that user can see, for example "UserName"; "Tag" will
be
used to store another field can be used to lookup, for example "UserID".

Hope this helps. Please feel free to post here if anything is unclear.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.

Jul 14 '06 #3
Hi Ryan,

Thank you for your update. Please feel free to post here if anything is
unclear.

Have a nice day!

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 16 '06 #4

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

Similar topics

0
by: Guyle Taber | last post by:
I'm trying to do a lookup from a table where an ID number equals a name. But in selecting from three tables, I can't seem to figure out how to display the data in the fashion I need. In the...
3
by: my-wings | last post by:
I've been reading about how evil Lookup fields in tables are, but I've got to be missing something really basic. I know this subject has been covered before, because I've just spent an hour or two...
1
by: Zachary Turner | last post by:
I want to make a Lookup Field based on another Lookup field. In other words, I have this table A with two fields: ID and Name, where ID is an Autonumber and Name is a friendly name. Then I have a...
3
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems...
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...
2
by: Christopher Brandsdal | last post by:
Hi! I have found a script to lookup domain names, but it is written in C#. I want so bad to translate this to VB! Can anyone help me? I have tried myself. The script seems to run fine, but I...
3
by: mkjets | last post by:
I have worked for hours on trying to find a solution and have not figured it out. I am working in Access 2003. I need to create a query that takes values from 1 table and displays them in...
5
by: NickCR_04 | last post by:
Hi all, I am (using ASP.net 2.0 in Visual Web developer 2005 Express Edit) trying to set up an asp front end to a music DB which has 2 main tables: 1) MUSIC - containing music release...
14
by: Mark | last post by:
I have a table with a field that uses a combobox to populate values. The Lookup tab within table design mode is the following: Display Control Combo Box Row Source Type ...
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
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?
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...
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...

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.