A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Double Dlookup



 
 
Thread Tools Display Modes
  #1  
Old February 11th, 2005, 01:57 PM
Dkline
external usenet poster
 
Posts: n/a
Default Double Dlookup

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?


  #2  
Old February 11th, 2005, 07:03 PM
MGFoster
external usenet poster
 
Posts: n/a
Default

-----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/AwUBQg0Bl4echKqOuFEgEQLbGQCgkQqvZk64NC9snaOeW8UD1J B7nUYAn1rU
EpSqV7m51GaYKI0AyIYscSYx
=qYO3
-----END PGP SIGNATURE-----


Dkline wrote:
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?


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Use of double quote key in Dutch Michel General Discussions 0 January 16th, 2005 02:13 PM
DLookUp for multiple forms [email protected] Using Forms 4 January 9th, 2005 10:48 AM
How do I add a ruler to an Excel spreedsheet? Bob General Discussion 3 September 1st, 2004 04:11 PM
Double quotes in Mail Merge Guru Mailmerge 6 May 5th, 2004 03:08 PM
Double bottom border Lee Setting up and Configuration 1 March 4th, 2004 11:01 PM


All times are GMT +1. The time now is 11:23 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.