G
Guest
Sorry for the poor title wording, I have two tables to make one query, one is
simply for convienence, here is the layout.
TABLE -TBLRideAlongMain
FIELD (primary key) -intRideAlongID
FIELD - strRideAlongName
TABLE - TBLRideAlongHistory
FIELD (foreignKey)- intRideAlongID (primary key is an autonumber and not
important)
FIELD - intActivity
FIELD - dtmDateofActivity
Example
TBLRideAlongMain
intRideALongID - 120
strRideAlongName - Joe Blow
TBLRideAlongHistory
Autonumberfield, intRideAlongID intActivity dtmDateofActivity
1 120 (Joe Blow), 12 01/01/2004
2 120 (Joe Blow), 13 01/01/2005
3 121 (John Smith), 12 01/01/2004
What i need to be able to do is query all activity 12 but only if there is
not a separate entry for Activity 13 for the same person, and activity 12
must have occurred more than 365 days prior, a simple >Date()-365 in the
criteria section
Any help would be appreciated
simply for convienence, here is the layout.
TABLE -TBLRideAlongMain
FIELD (primary key) -intRideAlongID
FIELD - strRideAlongName
TABLE - TBLRideAlongHistory
FIELD (foreignKey)- intRideAlongID (primary key is an autonumber and not
important)
FIELD - intActivity
FIELD - dtmDateofActivity
Example
TBLRideAlongMain
intRideALongID - 120
strRideAlongName - Joe Blow
TBLRideAlongHistory
Autonumberfield, intRideAlongID intActivity dtmDateofActivity
1 120 (Joe Blow), 12 01/01/2004
2 120 (Joe Blow), 13 01/01/2005
3 121 (John Smith), 12 01/01/2004
What i need to be able to do is query all activity 12 but only if there is
not a separate entry for Activity 13 for the same person, and activity 12
must have occurred more than 365 days prior, a simple >Date()-365 in the
criteria section
Any help would be appreciated