Oracle 8i SQL form/subform problem [message #21373] |
Tue, 30 July 2002 08:04 |
chhan
Messages: 19 Registered: June 2002
|
Junior Member |
|
|
Hi All,
i hope someone out there can help me. i am having a problem with my Oracle8i form/subform. The relationship between my form/subform is 1:M. and this is the problem:
when i select a customer, i want my subform to display all the vehicles which belong to that customer. i can do this if i'm using SQL PLUS by typing:
select tblVehicle.VehicleRegestration, tblVehicle.VehicleOwnerID from tblVehicle, VVehicleOwner where tblVehicle.VehicleOwnerID=VVehicleOwner.VehicleOwnerID;
RESULTS:
VEHICLEREG VEHICLEOWNERID
---------- --------------
P23TCS 47
S11ETC 52
S1TON 54
T258CHB 54
T12PET 54
C144TES 47
A155SWE 47
but when i place this code in the form, it doesn't work. the code is placed in 'POST CHANGE' in VehicleOwnerID text box, below is a copy of the code(no error when compile):
begin
select Vehicleid, VehicleRegestration
into :tblVehicle.Vehicleid, :tblVehicle.VehicleRegestration
from tblVehicle
where VehicleOwnerid =:tblVehicle.VehicleOwnerid;
end;
if anyone can help or if they think this is the wrong place to place this message, please let me know.
Many thanks in advance.
Chhan
|
|
|
|