How can you programatically tell if a field in a table is a lookup field? I am looping through the fields collection and I want to see if any fields are lookup fields.
Is there a property, or something taht will tell me if the field is a lookup field.
I need to do this at the table level and not at the form level because if a field is a lookup field then I do certain things in the code.
BTW, lookup fields suck.
2 2396 hyperpau 184
Recognized Expert New Member
How can you programatically tell if a field in a table is a lookup field? I am looping through the fields collection and I want to see if any fields are lookup fields.
Is there a property, or something taht will tell me if the field is a lookup field.
I need to do this at the table level and not at the form level because if a field is a lookup field then I do certain things in the code.
BTW, lookup fields suck.
Yes there is. Normaly, in the datasheet view of the table, the field would display a drop down arrow indicating that it is a drop down combo box look up.
Secondly, you can go to the design view, and on each field, go to the
lookup tab on the properties below. if it is text box, it is not lookup, if it is combo box, then it is lookup.
MMcCarthy 14,534
Recognized Expert Moderator MVP
How can you programatically tell if a field in a table is a lookup field? I am looping through the fields collection and I want to see if any fields are lookup fields.
Is there a property, or something taht will tell me if the field is a lookup field.
I need to do this at the table level and not at the form level because if a field is a lookup field then I do certain things in the code.
BTW, lookup fields suck.
Hi Lance,
It depends on what you mean by this.
Are you looking at the table as a recordset ? If so then the answer is know. How are you planning to access the table object. You could open it as a TableDef in code and then the properties will be available but what action are you then taking and what triggers this action.
You will need to give a lot more information about what you are trying to do.
Mary
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Richard Coutts |
last post by:
I want to create a table where the first field is a category, the
second field is a subcategory to the first field, and the third field
is a subcategory to the second. E.g., the category table might look
like this:
Toys
Jewelry
Sporting Goods
The second field lookup table might be:
|
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 reading about it on google,
but there is something I still don't understand, and I'm hoping someone will
be willing to explain it to me in small words.
Let's say I have a table for addresses, and it includes a field for state.
What I would...
|
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 table B
which links to A via a Lookup Field so that I can select the friendly
name from combo box. Now, I want to have a table C which links to
table B via a lookup field, and only displays the items which are
selected in some combo box of some...
|
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 that are hard
to find. The main problem I am having right now is that I have a report
that is sorted by one of these lookup fields and it only displays the
record's ID number. When I add the source table to the query it makes
several records...
|
by: Paul H |
last post by:
Say I have a table called tblPeopleInfo, one of the fields in the table is
called FavouriteFruit. The FavouriteFruit field is a lookup field and will
contain Apples, Oranges, Grapes etc..The list can be added to by users of
the database. What is the best way to construct this lookup?
Should it lookup a Table/Query or a Value List?
If it looks up to a Table/Query should the lookup table just have a single
"text" field or should it have...
| |
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 bound to a table as a lookup,
drawing values from another table to populate the available selections. This
all worked fine in VB6.
I have distilled the problem down to a simple form drawing data from the
Northwind database for a representative...
|
by: Paul H |
last post by:
Suppose I have a table called tblPeople and I want a field to illustrate
whether each person prefers cats or dogs. I could do it one of three ways.
1. A plain text field
Create a text field in tblPeople called PreferredPet.
2. A lookup field that stores text values.
Create a text field in tblPeople called PreferredPetID and use it to lookup
an identical text field in tblPreferredPets.
|
by: samdev |
last post by:
I have set up a table with a few fields that are set to
required....all work fine except the fields that are Lookup from
another table.
What am I forgetting to set?
Thanks!!
|
by: Ken Fine |
last post by:
This is a question that someone familiar with ASP.NET and ADO.NET DataSets
and DataTables should be able to answer fairly easily. The basic question is
how I can efficiently match data from one dataset to data in a second
dataset, using a common key. I will first describe the problem in words and
then I will show my code, which has most of the solution done already.
I have built an ASP.NET that queries an Index Server and returns a...
|
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: 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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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...
| |