Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cursor cannot be modified - error 2072

Status
Not open for further replies.

bpratl

Programmer
Jul 7, 2002
25
0
0
US
When appending the first record, to a grid, on a form we get a error 2072 - "Cursor cannot be modified" during a replacement. Buffering 5 is being used. Adding tableupdates
and moving record pointer has no effect on this error. This only happens when the grid is unpopulated.
 

Can you clarify this problem. In particular ...

What do you mean by "adding a record to a grid"? Grids don't hold records; cursors do. You say that the grid is "unpopulated". If you mean that there is no cursor bound to the grid, then how can you add records?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
The form in question is for selling & quoting on part sales. It uses three tables: Customer, Order & Inventory. Parts are displayed in a grid. All works well when selling a stock part from inventory. When trying to sell a non-stock part we use append blank, update customer # , quantity & sell price and refresh form. At this point we get the 2072 error at the Replace with order.total with QTY * order.sellPrice. This only happens if this is the first Part on the Invoice. It does not happen if a stock part is added first. This is an new problem that happened after upgrading from VFP 6 to VFP 9. The 2072 error seems to be a undocumented error.
 
IF what you are saying is you need to update the Cursor and the Gird with the cirsor properties. Once you add the new recrod. Re-query and then be sure to

thisform.grid1.Column1.Sparse = .f.
thisform.grid1.RecordSource = ""
thisform.grid1.RecordSource = "acall" Or what ever you cursor name is that you want to display
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top