I am totally stumped. I'm posting this on the off chance that someone has seen this before. This problem is a little hard to explain, since it's so weird, but here goes.
I have a form that I use for both displaying and editing data from an Access97 database. I use a datagrid bound to an ADO data control, along with a bunch of plain old text boxes (not bound to the DC) to display the data. When I open the form for displaying data, I open the database with a static cursor, lock read-only, and everything works as it should. When I open it for editing, the only thing I change (besides enabling a few command buttons, which don't come into play anyway) is the way I open it, usually keyset cursor, lock optimistic, although I've tried other ways.
The odd part is that when I do that, the very first element in the first row of the datagrid comes up blank. There is no Earthly reason why this should be happening. I have checked the database to make sure there's data in that field. I have traced the execution to make sure that I wasn't inadvertently changing anything. It all seems to check out.
What's really odd is that I can update that field from my program and then exit the editing form and go back in with the viewing form (these are the exact same form, just opening the database differently in the from load) and the data is there. But if I go back to edit it, it's in the textbox (and therefore in the recordset), but not the datagrid. If I change records or exit and come back in again, the data is gone completely, i.e. the recordset shows null in that field. I'm not running any updates and I've tried setting the datagrid's AllowUpdate property to false.
Does anyone have any clue what could be going on here? I've got basically the same setup on several other forms, and it works perfectly. But on this one form, the problem is consistent. Could it be some obscure property setting? Any reason it would affect only that one cell?
I have a form that I use for both displaying and editing data from an Access97 database. I use a datagrid bound to an ADO data control, along with a bunch of plain old text boxes (not bound to the DC) to display the data. When I open the form for displaying data, I open the database with a static cursor, lock read-only, and everything works as it should. When I open it for editing, the only thing I change (besides enabling a few command buttons, which don't come into play anyway) is the way I open it, usually keyset cursor, lock optimistic, although I've tried other ways.
The odd part is that when I do that, the very first element in the first row of the datagrid comes up blank. There is no Earthly reason why this should be happening. I have checked the database to make sure there's data in that field. I have traced the execution to make sure that I wasn't inadvertently changing anything. It all seems to check out.
What's really odd is that I can update that field from my program and then exit the editing form and go back in with the viewing form (these are the exact same form, just opening the database differently in the from load) and the data is there. But if I go back to edit it, it's in the textbox (and therefore in the recordset), but not the datagrid. If I change records or exit and come back in again, the data is gone completely, i.e. the recordset shows null in that field. I'm not running any updates and I've tried setting the datagrid's AllowUpdate property to false.
Does anyone have any clue what could be going on here? I've got basically the same setup on several other forms, and it works perfectly. But on this one form, the problem is consistent. Could it be some obscure property setting? Any reason it would affect only that one cell?