There are few problems that exist when you split a database about the only
thing I can think of that don't work is the actual seek command.
You can do one of two things to solve your problem:
a) use the coding work around as explained here:
How to perform seek on link tables:
http://www.mvps.org/access/tables/tbl0006.htm
b) simply use SQL code such as
whatFLAS = dlookup("ExemptStatus","tblFLSA","id = 'FLSA')
Note how the above is only one line of code and is that is less complex
then your example by quite a bit.
I would only use seek if I'm running over and over in a loop. There is
little if any advantage to speedier performance then the above dlookup for
one value.
and of course in other ways to use SQL
dim rec as recordset
set rec = currentdb.OpenRecordSet("select ExemptStatus from tblFLSA where
id = 'FLSA')
if rec.ReocrdCount > 0 then
WhatFLSA = rec("ExemptStatus")
else
WhatFLSA = ""
end if
rec.Close
So even if you write out the full SQL and execute a full query it's still
really less code then the seek. as mentioned I would only use the seek if
you're running this thing over and over in an actual type of loop where you
need to read the primary key over and over in a very rapid fashion. for
pulling just one value out seek not gain you any performance at all.