Problem With Filter

Hi,

Please Help me for This problem, I have a table as table1 and form as form1. the form source table is table1. in table1 having one option field and assume that options are (space),A,B,C and also table1 having two More fields and I entered data like

Date Comment Type(Option Field)

09/08/13 Its A Comment A

09/07/14 Its B Comment B

09/10/14 Its C Comment C

Now i want to filter my form1 based on that option. for that i created a varible like OptionG and options are same as the table1 option field. for that i have written code in OnValdate like

Rec.SETFILTER(“Type”,’%1’,OptionG);

It will works fine for the first selection but while coming to the second selection form shows the first filter selection also in the form that means

If I select A Then form1 shows

Date Comment

09/08/13 Its A Comment

again If i Select B then Form1 Shows

Date Comment

09/08/13 Its A Comment

09/07/14 Its B Comment

If I select C also then form1 shows…

Date Comment

09/08/13 Its A Comment

09/10/14 Its C Comment

But I dont want that first line in each and every selection how to solve this help me.

Help should be Appreciated

Thanks

Mahesh U

Which field Onvalidate did you write above code?

what type of page is it?

Did you check General Journal page? How the lines are shown based on Batch selection?