I have another embarrassingly simple question - how do I read a Table using the Primary Key?
I have a Table (called ‘Sciflat’) which has a two-field Primary Key (‘Genus’ and ‘Species’). I want to retrieve the ‘Family’ of a specific genus and species. I thought the SELECT statement would do the trick and so I coded the following…
SELECT Sciflat.Family FROM Sciflat
WHERE Sciflat.Genus = “Thrinax” AND Sciflat.Species = “alba”
However when I run the code I get the following debug error…
Compile Error: Expected Case
Can you tell me what I am doing wrong? As a temporary work-around I am reading the entire Sciflat Table using a DO LOOP until I get a hit on the genus and species but this is obviously pretty ugly and inefficient. Thx.
P.S. The version of Access I am running is Access Professional (2002) V 5.1.2600 under Windows XP.
I have a Table (called ‘Sciflat’) which has a two-field Primary Key (‘Genus’ and ‘Species’). I want to retrieve the ‘Family’ of a specific genus and species. I thought the SELECT statement would do the trick and so I coded the following…
SELECT Sciflat.Family FROM Sciflat
WHERE Sciflat.Genus = “Thrinax” AND Sciflat.Species = “alba”
However when I run the code I get the following debug error…
Compile Error: Expected Case
Can you tell me what I am doing wrong? As a temporary work-around I am reading the entire Sciflat Table using a DO LOOP until I get a hit on the genus and species but this is obviously pretty ugly and inefficient. Thx.
P.S. The version of Access I am running is Access Professional (2002) V 5.1.2600 under Windows XP.