Halo,

Since you don't mention what table "FSMEquip" is, I
assume it is just beyond our discussion. Perhaps you
would like it to be :

            case(tablenum(Vehicles)):
            vehicles = element.args().record();

            query.dataSourceNo(1).addDynalink(
             fieldnum(Vehicles,VehicleId),
             vehicles,
             fieldnum(VehicleOwnerHistory,VehicleId));

        break;

Look, I have replaced FSMEquip with Vehicles. But, if
only you insist to use table FSMEquip, it might be:

            case(tablenum(FSMEquip)):
            fsmEquip = element.args().record();

            query.dataSourceNo(1).addDynalink(
             fieldnum(FSMEquip,VehicleId),
             fsmEquip,
             fieldnum(VehicleOwnerHistory,VehicleId));

        break;

Look, I use fsmEquip instead of vehicles as input
parameter to invoke addDynaLink(). I don't know the
structure of your form data source, nor your tables'
schema. So this is all I can guess.

- Aji Sarosa -

--- cdlmalherbe01 <[EMAIL PROTECTED]>
wrote:

> I have a table "Vehicles" which contains 2 fields,
> "VehicleId"
> and "OwnerId".
>
> "VehicleId" is the primary key for table
> "VehicleTable".
>
> When the "OwnerId" is changed, I record the value of
> the
> previous "OwnerId" in a table called
> "VehicleOwnerHistory" with
> fields "VehicleId", "OwnerId", "DateChanged" etc.
>
> From my "VehicleTable" form, I want to launch a
> form "VehicleOwnerHistory" form which shows the list
> of historical
> owners. This form is used to view and update the
> list of historical
> owners.
>
> I looked at the "LedgerTransAccount" form and how it
> is launched
> from the "LedgerTable" form to show transactions for
> the selected
> account only. The principle applies to my problem.
>
> I've adapted the code in the "InitQuery" and
> "executeQuery" methods
> of the LedgerTransAccount form:
>
> --------void
> InitQuery()---------------------------------------
>       {
>           Query query;
>           Vehicles vehicles;
>           VehicleOwnerHistory vehicleOwnerHistory;
>
>           ;
>
>           query = new
> query(querystr(vehicleOwnerHistory));
>
>           switch(element.args().dataset())
>           {
>               case(tablenum(FSMEquip)):
>                   fsmEquip = element.args().record();
>      
>                 
> query.dataSourceNo(1).addDynalink(fieldnum
> (Vehicles,VehicleId),Vehicles,fieldnum
> (VehicleOwnerHistory,VehicleId));
>
>                   break;
>
>               default:
>           }
>
>           VehicleOwnerHistory_ds.query(query);
>       }
>
> --------public void
> executeQuery()-----------------------------------
>       {
>           this.InitQuery();
>
>           super();
>       }
>
> It seems to work except for the fact that it returns
> only 1 record
> when I launch the VehicleOwnerHistory form,
> irrespective how many
> matching records exist in the VehicleOwnerHistory
> table.
>
> All help appreciated!
>
>
>
>
>
>
>
>



           
__________________________________
Yahoo! Music Unlimited
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/




SPONSORED LINKS
Computer part Programming languages Microsoft axapta
Support exchange


YAHOO! GROUPS LINKS




Reply via email to