Help with FORMs accessing 2 tables
Posted in 1996
Topics: SQL Development & Query Writing
Hi all,
I want to create a FORM that can be queried to output a despatch date
based on two other fields matching between two tables. Two tables created
as follows:
create table A ( ordnum CHAR(20), linnum SMALLINT );
create table B ( ordnum CHAR(20), linnum SMALLINT, despdate DATE)
The following data is entered into table A:
ordnum linnum
order1 10
order1 20
order1 30
order2 10
order3 10
order3 20
The following data is entered into table B:
ordnum linnum despdate
order1 10 150796
order1 20 160796
order1 30 170796
order2 10 150796
order3 10 150796
order3 20 160796
The form to be created will look something like this:
ordnum [ ]
linnum [ ]
despdate
I wish the user to enter an order number, line number or both, that should
match between tables A and B and output a despatch date from table B. I
have looked at composites, joins etc...and am getting nowhere.
Any help with constructing the required FORM would be extremely very much
appreciated.
Cheers, Ian.