>OK here is my problem:
>My grid has "MyTable" as RecordSource and "1-Alias" as RecordSourceType
>When i click on a record in the grid the information in that record is posted in some textboxes on the form. To do this i have "thisform.refresh" in the click event of Grid1.Column1.text1
>
>So far i have only used the form designer to make the form with the grid and everything works great.
>
>Then I added a Delete-button that deletes the current selected record in MyTable and to do this I use:
>"delete" and then "pack"
>
>After the record has been deleted and the table packed the grid is blank ie. all its properties are set to default.
>
>So my solution to this was to just set all the properties and methods on the fly, but I ran into problems when I got to the click event.
>
>Has anyone ever encountered a problem like this?
>How would you go abouts solving this?
>
>Thanks
>Einar
Einar,
Hit this thread from another link.
Never pack the table in cases like this.
Second if for any reason you would change underlying cursor for a grid first set grid.recordsource to '', do whatever you'd and reassign recordsource. This provides grid to keep its format and controls.
Cetin