Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detect if lookup field in table

Status
Not open for further replies.

danvlas

Programmer
Jul 30, 2002
2,446
RO
Hi guys,

Is there anyone that knows how to determine (in code) if a field from a table (in a remote database, of course!) is a damn lookup field and if yes, what its source is?


Thanks for your help (if I figure it out myself, I'll post back)



[pipe]
Daniel Vlas
Systems Consultant

 
Never mind.

Found out that I can inspect field's RowSourceType property.
If it's not a lookup field, an error occurs and that's enough for what I need now.

On Error Resume Next
test = fld.Properties("RowSourceType")
If Err.Number = 0 Then
MsgBox "WOW...It's a lookup field! Who did it???"
End If



[pipe]
Daniel Vlas
Systems Consultant

 
LOL - I love the message!

Let them hate - so long as they fear... Lucius Accius
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top