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

Strange behaviour with a memo field 2

Status
Not open for further replies.

keepingbusy

Programmer
Apr 9, 2000
1,470
GB
Hi all

Can anyone suggest why this is happening?

I currently use the following to append a previous record from a table:
Code:
USE MYTABLE SHARED
APPEND FROM MYTABLE FOR URN=murn
REPLACE MEMONAME WITH ""
Needles to say, all the previous details, name, address, etc are copied from the existing record into the new one and I am simply tryng to clear the memo field so the user can add thier own informaiton on a form.

Here's the problem....

When the form is displayed, the original information from the previous record appended is shown no problem. I tried a test by placing:
Code:
BROWSE FIELDS MEMONAME
in the INIT of the form and the MEMO field is blank.

When you click on the pageframe tab (The MEMO field is shown in an edit box on a pageframe) the original information from the previous record is shown.

I have checked to make sure that the new record is showing on the form (it has two other fields called SECNUM (Consective Number) and SECYER (Record Year)) which confirms it is a new record.

Before I pull out what hair I have left, any suggestions guys?

By the way, I am using VFP 6 for this project.

Many thanks

Lee

Visual FoxPro Versions: 6 & 9
Operating System: Windows XP
 
How did you Bind your editbox to the memo field?

I suspect that the underlying table data is correct but your editbox is simply not getting refreshed. Try putting a this.refresh in the activate method of the page containing your editbox.

Jean
 

Lee,

At first glance, I'd agree with Jean. Remember, when you issue a Refresh for a form with a page frame, only the active page is refreshed. Usually, you need to refresh each page specifically from the page's Activate.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Mike / Jean

I've added:
Code:
thisform.pageframe1.page3.edtstatement.refresh
to the forms INIT and that's worked

Many thanks to both of you

Lee

Visual FoxPro Versions: 6 & 9
Operating System: Windows XP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top