|
-
Aug 11th, 1999, 01:05 AM
#1
Thread Starter
Frenzied Member
Please clarify.
You have two uniquekeys or you have a primary key that is made up from 2 fields?
-
Aug 11th, 1999, 11:29 AM
#2
Member
Hi!,
I am trying to search a Access 97 database using 2 primary keys but I have no idea how to use 2 primary keys to search Access. 1 yes, 2 no. Can anyone help point me in the right direction? Thanks!!
Lloyd
-
Aug 11th, 1999, 11:37 AM
#3
New Member
First of all, why would you need 2 primarykeys in a table. Secondly if both of them are primary or rather unique key, you just have to search for one. If you are talking about a primarykey made up of 2 fields, then the code is simple.
dim tbl as database
dim rst as recordset
set tbl = THEDATABASEFILE/LOCATION
set rst = tbl.opendatabase("THETABLENAME", dbopentable)
rst.index = "primarykey"
rst.seek "=", FIELD1, FIELD2
if rst.nomatch ...
bla..bla...
-
Aug 11th, 1999, 05:44 PM
#4
Member
Thanks!! I got it working (well half way but I think I can handle it from here.)
Thanks for the help!!
Lloyd
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|