Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memo Field in a Grid - refuses to update
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Memo Field in a Grid - refuses to update
Miscellaneous
Thread ID:
00588744
Message ID:
00588744
Views:
66
Hi everybody,

Sorry for starting another thread, but I'm in desperate. I have a local view based on one table. Table is called FilingDate, view is called FilingView. It has one memo field called Notes. I have two grids in my form:
upper grid is BatchCntrl, the other one (related) is FilingView grid. Here is a code in BatchCntrl.AfterRowColChange:
lparameters ncolindex
local m.lnRecno
lnRecno = recno('BatchCntrl')
if this.nCurRec <> m.lnRecno
	with thisform		
		if getnextmodified(0,'FilingView')>0
			=tableupdate(0,.t.,'FilingView') && Update the record, so it would not complain
		endif		
		if .nDsID <> BatchCntrl.DsID and not .bFullFDView
			.nDsID = BatchCntrl.DsID
			lnIDLow =  BatchCntrl.DsID
			lnIDHigh = BatchCntrl.DsID
			lcStWkHigh = .ThisState + .ThisYr + .ThisWk
			lcStWkLow = .cLowWeek
			requery('FilingView')
		else
			local lcSetNear
			lcSetNear = set('near')
			set near on
			=seek(BatchCntrl.rcode + BatchCntrl.town + ;
			BatchCntrl.ExtrYear + BatchCntrl.ExtrWeek,"FilingView","rcTownWeek")
			.grdFiling.nCurRec = recno('FilingView')
			.grdFiling.refresh()
			if m.lcSetNear = "OFF"
				set near off
			endif
		endif
		this.statusbartext = "Record " + transform(m.lnRecno)+" of "+ ;
			transform(reccount('BatchCntrl'))+ " records in BatchCntrl..."
		.refresh()
		.NavStand.navUpdate()
	endwith
endif
dodefault(m.ncolindex)
I also added TableUpdate in grdFiling.AfterRowColChange and grdFiling.Valid. There are other places, when TableUpdate is called as well. I don't see any error's reports. However, if I change something in the memo, then go to another record in the BatchCntrl grid, then go back to my original record, my changes are reverted back to the original. If I repeat this procedure, but change something again, I now see my previous change. Our form has its own Error Handler. However, errors are not reported, so I think, tableupdate worked fine.

I use standard textbox in a grid for memo field. DoubleClick brings a window for editing...

Could you please advise, what could be wrong here? Same view works from command window and update Memo field correctly.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform