Double Dlookup

  • Thread starter Thread starter Dkline
  • Start date Start date
D

Dkline

I have a table to which I need to do a double lookup.

Table structure is:
[ID] [MinAge] [MinFace] [MedicalReq1] [MedicalReq2]
....[MedicalReqN]
1 0 0 True False
False
2 0 10000000 True False
False
3 0 20000000 True False
False
4 0 50000000 True True
False
5 16 0 True False
False
6 16 10000000 True False
False
7 16 20000000 True False
False
8 16 50000000 True True
False
and so on through some 40 records

Criteria is the age of the insurance AND the face amount of the policy.

What I need to do is select which record in the table meets both the
[MinAge] and [MinFace]. The Query is to return

Can I nest Dlookups? Should I just jump into VBA and do a nested Case?

What is the best solution for something like a double lookup?
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It looks like your post has some parts missing "The Query is to return
[....???]" Return what?

Design criticism:

The table columns are in spreadsheet mode, you should change the table's
definition to this:

CREATE TABLE table_name (
ID INTEGER , -- could be an AutoNumber (COUNTER)
MinAge INTEGER ,
MinFace INTEGER
)

The table that holds the MedicalRegs, linked to "table_name" by the ID.

CREATE TABLE MedicalReqs (
ID INTEGER NOT NULL REFERENCES table_name ,
MedicalRegNbr BYTE NOT NULL , -- your column number
MedicalReg BOOLEAN NOT NULL ,
CONSTRAINT PK_MedicalRegs PRIMARY KEY (ID, MedicalRegNbr)
)

Read the Access Help article:

Creating and Working with Databases
About designing a database

and any book on relational database design, for more info.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQg0Bl4echKqOuFEgEQLbGQCgkQqvZk64NC9snaOeW8UD1JB7nUYAn1rU
EpSqV7m51GaYKI0AyIYscSYx
=qYO3
-----END PGP SIGNATURE-----
 
Back
Top