Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange problem with reading info from buffered table
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01248697
Message ID:
01248699
Views:
24
This message has been marked as a message which has helped to the initial question of the thread.
Naomi,

Two separate threads of thought here...

1) If the project.ahcProj.project REPLACE statement fails, I don't think the one for Building will execute. Could that one be failing somehow? Can you separate them into two separate REPLACE statements and see if that works?

2) Try this instead:
REPLACE lastbldg WITH control.lastbldg + 1 IN control
=tableupdate(.t.,.t.,'Control') && ? Saved changes in Control table right away?

INSERT INTO Building ;
(Project, Building, kybuilding, state, status, dstatus, unitCount) ;
VALUES ;
(ahcProj.project, m.lnNewNO, control.lastbldg, 'NY', 'A', date(), 1)
and then continue with checking IF m.lnNewNO > 1 AND ...

HTH.


>Hi everybody,
>
>I'm working with my colleague's form and I'm puzzled.
>
>This is the code
>
>
>select Building
>	append blank
>	replace project with ahcProj.project, Building with m.lnNewNO in Building
>	replace lastbldg with control.lastbldg + 1 in control
>	=tableupdate(.t.,.t.,'Control') && ? Saved changes in Control table right away?
>
>	replace kybuilding with control.lastbldg, state with 'NY', ;
>		status with 'A', dstatus with date(), unitCount with 1 in Building
>
>	if m.lnNewNO > 1 and vartype(m.tcMode) = 'C' and m.tcMode = 'Clone' && This is not a new building
>		replace Street with m.loCurRecord.Street, ;
>			StrSuffix with m.loCurRecord.StrSuffix, ;
>			City with m.loCurRecord.City, ;
>			state with m.loCurRecord.state, ;
>			zip5 with m.loCurRecord.zip5, ;
>			zip4 with m.loCurRecord.zip4, ;
>			AddrAddl with m.loCurRecord.AddrAddl, ;
>			County with m.loCurRecord.County, ;
>			SwisCode with m.loCurRecord.SwisCode in Building
>	endif
>
>*Add new mortgage record
>	select Mortgage
>	append blank
>	replace project with Building.project, ;
>		Building with Building.Building, ;
>		kybuilding with Building.kybuilding in Mortgage
>
>	thisform.addClicked = .t.
>	thisform.nJustAdded = recno('Building')
>	thisform.updStatus.ProjStatC(ahcProj.project)
>	thisform.selBuilding = STR(building.building)
>
>The m.lnNewNO is 8, yet the Building.Building is 1 when I look at this in debugger.
>
>What am I missing?
>
>Thanks a lot in advance.
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform