Connecting Tech Pros Worldwide Help | Site Map

Lookup Fields

Newbie
 
Join Date: Jun 2007
Posts: 2
#1: Jun 25 '07
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.
hyperpau's Avatar
Expert
 
Join Date: Jun 2007
Posts: 177
#2: Jun 26 '07

re: Lookup Fields


Quote:

Originally Posted by Lance Williams

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.
msquared's Avatar
Administrator
 
Join Date: Aug 2006
Location: Dublin, Ireland
Posts: 10,865
#3: Jun 29 '07

re: Lookup Fields


Quote:

Originally Posted by Lance Williams

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
Reply