Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with navigation
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Problem with navigation
Miscellaneous
Thread ID:
00612386
Message ID:
00612386
Views:
61
Hi everybody,

I have a table opened with specific order (Situs) and a filter (AddrStatS='5'). I have Accept button on the form, which invokes the following method with 'All':
***********************************************
*  Description.......: AddrStdMain.UpdateBldMstrRecords
*  Calling Samples...:
*  Parameter List....: tcMode
*  Created by........: Nadya Nosonovsky 12/14/2001 04:22:39 PM
*  Modified by.......: Nadya Nosonovsky 01/28/2002 03:08:13 PM
********************************************************************
lparameter tcMode
if vartype(m.tcMode)<>"C"
	tcMode = 'Cur'
else
	tcMode = proper(m.tcMode)
endif
local lnRecno, lcAddress, lcExact, lnNewRecno
select BldMstr
lnRecno=recno('BldMstr')
lcExact = set('exact')
set exact off && Need for partial search
wait window nowait "Wait while replacing..."
with thisform
	.lockscreen=.t.
	do case
	case (.ProcType='prclproc' and .SubProc='ppsitus') ;
			or inlist(.ProcType,'siteproc','trxnproc')
		if m.tcMode = 'Cur' && Current record only
			replace AddrStatS with '6', ; && Manual-Resolved
			Street with proper(Streets.Street), ModiType with 'C' in BldMstr			
		else
			lcAddress = upper(BldMstr.ccode+BldMstr.town+BldMstr.Street)
			replace AddrStatS with '6', ; && Manual-Resolved
			Street with proper(Streets.Street), ModiType with 'C' ;
				for upper(ccode+town+Street+str(StNum,4)+StNumExt+Unit) = m.lcAddress in BldMstr
		endif
*ccode with Streets.ccode, town with Streets.town, ;

	case (.ProcType='prclproc' and .SubProc='ppowner') or .ProcType='ownrproc'
		if m.tcMode = 'Cur' && Current record only
			replace OwnerCity with proper(Streets.City), OwnerState with Streets.State, ;
				AddrStatO with '6', ; && Manual-Resolved
			OwnerStrt with proper(Streets.Street), ModiType with 'C' in BldMstr
		else
			lcAddress = upper(BldMstr.OwnerState+BldMstr.OwnerCity+BldMstr.OwnerStrt)
			replace OwnerCity with proper(Streets.City), OwnerState with Streets.State, ;
				AddrStatO with '6', ; && Manual-Resolved
			OwnerStrt with proper(Streets.Street), ModiType with 'C' ;
				for upper(OwnerState+OwnerCity+OwnerStrt+str(OwnerStNum,4)+OwnerStNumExt+OwnerUnit) ;
				= m.lcAddress in BldMstr
		endif
	endcase
	lnNewRecno = recno('BldMstr')
	if m.lcExact='ON'
		set exact on && Restore exact
	endif
	if .EditMode
		.add()  && Save records
	endif
	.MoveNextRecord(m.lnRecno)
	.navstand.navUpdate()
	.grdBldMstr.AfterRowColChange()
	.lockscreen=.f.
endwith
wait clear
MoveNextRecord, however, skips two records instead of just one:
********************************************************************
*  Description.......: AddressForm.MoveNextRecord
*  Calling Samples...:
*  Parameter List....: tnRecno
*  Created by........: Nadya Nosonovsky 08/21/2001 03:44:58 PM
*  Modified by.......: Nadya Nosonovsky 10/03/2001 02:08:21 PM
********************************************************************
lparameter tnRecno
if !eof()
	skip
	if recno()= m.tnRecno && we're still on the same record
		if !eof()
			skip
		else
			if !bof()
				skip -1
			endif
		endif
	endif
else
	if !bof()
		skip -1
	endif
	if recno()= m.tnRecno && we're still on the same record
		if !bof()
			skip -1
		else
			if !eof()
				skip
			endif
		endif
	endif
endif
if eof()
   if !bof()
     skip -1
   endif
endif
Could you please help me with this problem?

Thanks in advance.
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