CREATE TABLE [SF_Currency] ( [Currency] varchar(4) COLLATE Latin1_General_CI_AS NOT NULL, [Description] varchar(32) COLLATE Latin1_General_CI_AS DEFAULT (''), [Symbol] varchar(4) COLLATE Latin1_General_CI_AS DEFAULT (''), [InternCode] varchar(4) COLLATE Latin1_General_CI_AS DEFAULT (''), [AmountRoundingDigit] smallint DEFAULT (0), [AmountRoundingDigit] smallint DEFAULT (0), [TaxAmountRoundingType] char(1) COLLATE Latin1_General_CI_AS DEFAULT ('A'), [TaxAmountRoundingDigit] smallint DEFAULT (0), [NoDecimals] smallint DEFAULT (0), [Notes] text COLLATE Latin1_General_CI_AS DEFAULT (''), [IsEUCurrency] bit DEFAULT (0), [Disabled] bit DEFAULT (0), [Ins_Usr] varchar(48) COLLATE Latin1_General_CI_AS DEFAULT (host_name()) NOT NULL, [Edt_Usr] varchar(48) COLLATE Latin1_General_CI_AS DEFAULT (host_name()) NOT NULL, [Ins_Date] smalldatetime DEFAULT (getdate()) NOT NULL, [Edt_Date] smalldatetime DEFAULT (getdate()) NOT NULL, CONSTRAINT [PK_Currency] PRIMARY KEY ([Currency]) ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO2) The Child Page (Grid) use a Cursor Adapter of this table:
CREATE TABLE [SF_CurrencyFixing] ( [Currency] varchar(4) COLLATE Latin1_General_CI_AS NOT NULL, [ReferredCurrency] varchar(4) COLLATE Latin1_General_CI_AS NOT NULL, [FixingDate] datetime NOT NULL, [Fixing] float(53) DEFAULT (0), [SaleFixing] float(53) DEFAULT (0), [PurchaseFixing] float(53) DEFAULT (0), [Ins_Usr] varchar(48) COLLATE Latin1_General_CI_AS DEFAULT (host_name()) NOT NULL, [Edt_Usr] varchar(48) COLLATE Latin1_General_CI_AS DEFAULT (host_name()) NOT NULL, [Ins_Date] smalldatetime DEFAULT (getdate()) NOT NULL, [Edt_Date] smalldatetime DEFAULT (getdate()) NOT NULL, CONSTRAINT [PK_CurrencyFixing] PRIMARY KEY ([Currency], [ReferredCurrency], [FixingDate]), CONSTRAINT [FK_SF_CurrencyFixing] FOREIGN KEY ([Currency]) REFERENCES [dbo].[SF_Currency] ([Currency]) ON UPDATE NO ACTION ON DELETE CASCADE ) ON [PRIMARY] GO3) Each Record of SF_CurrencyFixing Table is a row in the Child Grid
Select SF_CurrencyFixing.Currency, SF_CurrencyFixing.REFERREDCurrency, SF_CurrencyFixing.FIXINGDATE, SF_CurrencyFixing.FIXING, SF_CurrencyFixing.SALEFIXING, SF_CurrencyFixing.PURCHASEFIXING, SF_CurrencyFixing.INS_USR, SF_CurrencyFixing.EDT_USR, SF_CurrencyFixing.INS_DATE, SF_CurrencyFixing.EDT_DATE From SF_CurrencyFixing WHERE Currency=?CASF_Currency.CurrencyAnd with this Select The form work fine.
Select SF_CurrencyFixing.Currency, SF_CurrencyFixing.REFERREDCurrency, SF_CurrencyFixing.FIXINGDATE, SF_CurrencyFixing.FIXING, SF_CurrencyFixing.SALEFIXING, SF_CurrencyFixing.PURCHASEFIXING, SF_CurrencyFixing.INS_USR, SF_CurrencyFixing.EDT_USR, SF_CurrencyFixing.INS_DATE, SF_CurrencyFixing.EDT_DATE From SF_CurrencyFixing WHERE Currency<>CASF_Currency.CurrencyBut, I am not sure that it is the better method and I am not sure that the syntax of Select is right.