General information
Category:
Forms & Form designer
Title:
Trouble writing to a cursor using a grid
I have a grid on a form. The grid has 4 columns. I want the first two columns to be read-only while I want the user to be able to write changes to the cursor by making changes to columns 3 and 4. Initially, I have the recordsource set to blank " " and the recordsourcetype set to "1 - Alias" to display an empty grid.
A button on the form has a click method that creates a cursor and inserts data into that cursor. I then programmatically set the recordsource of the grid to the cursor, I set the controlsource for each column to the name of the field in the cursor, I set the grid's read-only property to .F. and I set the read-only property of the each column (and its textbox) as described above.
When I run the form, the data is loaded into the cursor properly. Since I have just created the cursor, it is opened exclusively. Any attempt to change any value in any of the four columns on the grid is met with a message on the status bar: "The control is read-only".
What am I missing??
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only