Lookup Fields

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Lance Williams
    New Member
    • Jun 2007
    • 1

    Lookup Fields

    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.
    Last edited by Lance Williams; Jun 25 '07, 05:22 PM. Reason: Spelling
  • hyperpau
    Recognized Expert New Member
    • Jun 2007
    • 184

    #2
    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.

    Comment

    • MMcCarthy
      Recognized Expert MVP
      • Aug 2006
      • 14387

      #3
      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

      Comment

      Working...