468,771 Members | 1,834 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,771 developers. It's quick & easy.

record lookup

Hi,
I'm struggling with something..
I'v three tables:
1. land, fields : land-id (Autonumber), land (Text)
2. league, fields : league-id (Autonumber), land-id (Number), league (Text)
3. competition, fields : competition-id (Autonumber), land-id (Number),
league-id (Number).

table 2, field land-id is a lookup on table 1.
table 3, field land-id is a lookup on table 1.
table 3, field league-id is a lookup on table 2.

I want to enter competition rows in tableview using the lookups, but I want
the lookupdata from league-id to be dependent on what was selected in
land-id.

How do I do that ?? (big problem for me at the moment..)

pls hlp me.
kind regards, Jack.
Nov 13 '05 #1
1 1355
call a sub in the afterUpdate event of cboLandId that changes rowsource
of cboLeagueId

leagueId.rowSource = "SELECT * FROM tblLEAGUE WHERE leagueId in
(SELECT DISTINCT leagueId FROM tblCompetition WHERE landId = '" &
cboLandId & "')"

call the same sub from the form's onCurrent event

Jack de Visser wrote:
Hi,
I'm struggling with something..
I'v three tables:
1. land, fields : land-id (Autonumber), land (Text)
2. league, fields : league-id (Autonumber), land-id (Number), league (Text)
3. competition, fields : competition-id (Autonumber), land-id (Number),
league-id (Number).

table 2, field land-id is a lookup on table 1.
table 3, field land-id is a lookup on table 1.
table 3, field league-id is a lookup on table 2.

I want to enter competition rows in tableview using the lookups, but I want
the lookupdata from league-id to be dependent on what was selected in
land-id.

How do I do that ?? (big problem for me at the moment..)

pls hlp me.
kind regards, Jack.


Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

17 posts views Thread by Rick | last post: by
7 posts views Thread by Mike | last post: by
2 posts views Thread by vbnetdev | last post: by
1 post views Thread by Ryker | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.