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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Characters being inserted in textbox

Status
Not open for further replies.

eogvot

Programmer
Mar 11, 2009
9
US
I have a form containing a pageframe with 5 pages. When the form is opened, the application retrieves data from the last record in the table and displays it. There are 'previous' and 'next' buttons to allow users to scroll through the table, changing the data that is displayed. They then click an 'edit' button to activate the pageframe pages so that they can modify the data.

For some of my installations, users are experiencing a problem when they scroll to a record, click 'edit', and then begin to type data into a textbox. After a couple of keystrokes, the system is suddenly entering characters that appeared in the textbox when the previous record was displayed.

This does not occur for all textboxes, seems to be limited to text boxes that hold 30 characters or more. Nor does the problem occur if the user clicks an 'add' button which scatters blank memory variables.

I've tried inserting 'clear typeahead' and 'sys1104)' commands with no improvement.

Some background: I am using VFP 7.0, SP1. Each textbox has a controlsource that is a memory variable created using a scatter command, input mask property: =Replicate('X',30) format property: !T and a simple interactive change event that sets a variable=.t. so I can tell if the field was changed. All variables are public. The table is a 'free table', not part of the form's data environment, and a legacy clipper table with memo field (DBF/DBT)

The application is running on a variety of computers, XP Pro, Vista, 2000 with a range of RAM.

Any ideas would be welcome. Thanks

 
when they scroll to a record, click 'edit', and then begin to type data into a textbox. After a couple of keystrokes, the system is suddenly entering characters that appeared in the textbox when the previous record was displayed.
When are you refreshing the display?
Try putting this.pageframe.page#.refresh as the first command in the click event of the edit button.


This old world keeps spinning round - It's a wonder tall trees ain't layin' down
 
White605 - Thanks for the idea.

I tried it, but it does not resolve the issue. I also tried scattering the variables again with no luck.

Interesting that this problem does not occur on any other page in the pageframe - only on the 1st one.
 
Ive had a form with pageframe to do flakey things, probably because I didnt set it up correctly in the first place.
Try the pageframe.page#.setfocus and put a refresh in it
wjwjr

This old world keeps spinning round - It's a wonder tall trees ain't layin' down
 
I believe that you've found the solution. I'll ship it out to 1 customer who repeatedly sees the problem and have them test it more thoroughly.

Thanks
 
FWIW, using public variables and SCATTER/GATHER is a bad idea. Actually, it's two bad ideas. Sooner or later, public variables will bite you. SCATTER/GATHER was a great idea in FoxPro 2.x, but in VFP, buffering eliminates the need for it.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top