datagrid current cell changed

I have a datagrid populated by a series of sql statements. When a cell is clicked, a reports is printed and then returns to the datagrid. Everyting work well except the prior selection ( cell clicked) does not release the old value. The old value appears in the same cell on the next sql select statement.

Any Idea's?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sorry confusion, can u explain what is happening actually
stephenz43Author Commented:
I have a form with 5 buttons down the right hand side. Each button is a different sql statement (query)
the user selects a button( query) and the datagrid is populated with data based on the sql statement
the user then clicks on one of the items of the grid and a report related to that item is fired.

All this works...but

If the user runs another query for the datagrid, the value of the prior click appears on the new grid.
just refresh after clicking and that's over
Uday EthirajuluCTOCommented:
In Every button click clear the datagrid then reload the data

Basically i assume that you are using a datagrid associated with a recordset.

so everytime when different buttons are clicked, on the click event you bind the datasource of the datagrid to nothing.

after that bind the record set to the datagrid..
this wills olve your problem

Datagrid1.datasource = nothing
Datagrid1.datasource = <recordset>

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.