Changing data in one page from another page 
Author Message
 Changing data in one page from another page

I have a page frame with 6 pages. On one of the pages I
want to change the value of a text box on another page. I
have tried the following without success. Both pages are
enabled and the field (text box) to be changed is enabled.

On the active page, I am working with a child table of the
table for the other page, and want to change a value in
the parent table based upon data being placed in the child
table.

1. I have used a replacement statement (path.a=path.b)
from the active page to the page with the textbox to be
changed which does not work.
2. I have used setfocus and a keyboard command to change
the data in the other page which does not work.
3. I have duplicated the field to be changed in the
current page and set the value of that and that does not
work.
4. I have set up a public variable and placed its value in
the txtbox for the parent table upon returning
(activating) to that page which does not work.
5. I have used replace statements direct to the table and
that does not work either. It just gets changed back.

I have to admit that it's probably simple, but none of the
books I have covers this, I can't find it in the knowledge
base, and I have run out of ideas.

Any suggestions?



Thu, 24 Jun 2004 12:58:01 GMT  
 Changing data in one page from another page
If the ControlSource properties of the TextBoxes on the pages are fields in
two different tables, you need to do a REPLACE table2.field WITH
table1.field IN table2, and then Refresh your other page.  If you're just
trying to get a value from one page to display in a different TextBox on
another page, you'll need to do a this.Parent.Page2.TextBox.Value =
this.TextBox.Value.

Some actual names of your fields and ControlSources of your two TextBoxes
might make this clearer.

--

Fred
Microsoft Visual FoxPro MVP
Please respond only to the newsgroups so that all may benefit.


Quote:
> I have a page frame with 6 pages. On one of the pages I
> want to change the value of a text box on another page. I
> have tried the following without success. Both pages are
> enabled and the field (text box) to be changed is enabled.

> On the active page, I am working with a child table of the
> table for the other page, and want to change a value in
> the parent table based upon data being placed in the child
> table.

> 1. I have used a replacement statement (path.a=path.b)
> from the active page to the page with the textbox to be
> changed which does not work.
> 2. I have used setfocus and a keyboard command to change
> the data in the other page which does not work.
> 3. I have duplicated the field to be changed in the
> current page and set the value of that and that does not
> work.
> 4. I have set up a public variable and placed its value in
> the txtbox for the parent table upon returning
> (activating) to that page which does not work.
> 5. I have used replace statements direct to the table and
> that does not work either. It just gets changed back.

> I have to admit that it's probably simple, but none of the
> books I have covers this, I can't find it in the knowledge
> base, and I have run out of ideas.

> Any suggestions?



Thu, 24 Jun 2004 14:09:01 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Change page in a page frame?

2. Page Paging Web Data Sets?

3. No header in last report page if no detail in that page

4. Page numbering on summary page

5. Page Header in Reports on last Page ?

6. Page of Pages - VPF6

7. Eject page batwing pages in a report

8. PAGE UP/PAGE DOWN HANGS EXE

9. Removing Pages & Page Frames

10. VFP6 Report - Column Lines to Page Footer on Last Page

11. VFP 5.0a: printing duplex pages with desired page breaks

12. Iterating from first page to second page?

 

 
Powered by phpBB® Forum Software