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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Self Referencing table

Status
Not open for further replies.

sermac

Programmer
Jul 27, 2002
238
0
0
US
Hi: I have a rolodex table, I added a dropdown combo with the following sql. . .referencing back to 2nd index rolo_IDspouse. . .
Code:
Select Alltrim(name_first)+' '+Alltrim(name_mi)+' '+Alltrim(name_last),rolo_ID from Dex_Name Order by name_last into Cursor cboSpouse
How shd I rework the sql whereby the dropdown would "not"
list the record of the record I am sitting on?

Husband is in the rolodex, Wife is in the rolodex. I can pick Wife to Husband, and Husband to Wife, but am trying to filter the dropdown cboSpouse. (. . .don't want the husband to be able to marry himself! and visa versa. . .)

Appreciate any feedback
THX

Bill
 
I'd make use of the WHERE clause... mabe you have an EntryId or something you could use to 'know' where you are (recno() isn't a good practice).

lnThisEntryId=EntryId
SELE ... WHERE EntryId#lnThisEntryId

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top