stLinkCriteria = "(FName = """ & Me.FName & _
""") AND (LName = """ & Me.LName & _
""") AND (Phone1 = """ & Me.Phone1 & """)"
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Donna" <Do...@discussions.microsoft.com> wrote in message
news:49EA578B-CBC7-4E68...@microsoft.com...
>I have a table that has 3 fields as its primary key. How do I create a
> stLinkCriteria phrase that will open another form using those three fields
> as
> the linking criteria?
>
> Field names are FName, LName & Phone1
>Thanks, Allen! Along similar lines, I have a combo box for doing "searches"
>on a form. Again, the Primary Key is composed of these same 3 fields. But I
>can only get it to bind to 1 column; I need it to bind to all 3 columns.
>Right now, if I search for "Smith" & there are 3 "Smiths", it will only go to
>the 1st "Smith", even though I am selecting the 2nd or 3rd one. I assume
>that's because it can only be bound to column 1. Can I bind it to 3 columns?
You'll do much better to have a unique PersonID (which might not be
meaningful or visible to the user), and use it as the bound column of
the combo.
John W. Vinson[MVP]
It will also simplify your life when you come to create related tables for
these entries.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"John Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message
news:igqr129gf6ig863ns...@4ax.com...