Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding a record
Message
From
01/11/1997 12:30:22
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00057478
Message ID:
00057792
Views:
32
>> PROCEDURE cmdadd.Click
>>
>>
>> thisform.txtname.visible=.t.
>> thisform.combo1.visible=.f.
>>
>> thisform.cmdsave.visible = .t.
>> thisform.cmdabort.visible = .t.
>> *select rob
>> scan for empty(name)
>> blank
>> dele
>> endscan
>> goto top
>>
>> set dele off
>> loca for deleted()
>> if found()
>> m_add_mode = .f.
>> blank
>> recall
>> else
>>
>> m_add_mode = .t.
>>
>> append blank
>>
>>
>> endif
>> set dele on
>>
>> thisform.refresh
>> thisform.txtname.setfocus
>> ENDPROC
>Robert,
>
>In the code above you never select a work area (because that line is commented out), how are you sure that the sacn and append commands are working in the work area that you want them to? You also call a form refresh which will execute the refresh of all of the controls in the form, is there any code in any of those control's refresh methods that might move the record pointer on you?

Jim,
When I have these kinds of problems where there is not much code involved and
I know things should work, I starting thinking there must be something wrong with the vfp CD I got from MS. I think things like the power went off when MS was making my CD and someone forgot to trash the CD and put in a new one. I start thinking that I am the only one in the world that has a bad CD. Then you
come along, and tell me to check the REFRESH option. I thought that REFRESH only repaints the screen. When I took out REFRESH, my APPEND BLANK now adds a blank record to the table. I must REFRESH after the APPEND BLANK, so I will check to see if I have code moving the record pointer. At least, this gives me a starting place. Thanks for your patience and always being there to help. :))))))
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Previous
Reply
Map
View

Click here to load this message in the networking platform