I have a form that displays basic information from a table in a list box with its row source as table fields. When the user clicks a record in the list box another form comes up with complete detail for the selected record displayed in text boxes with the table fields as their control source. The detail screen allows previous and next choices that move the record pointer. There is also an exit button to return to the previous screen.
Both forms are modal and use the default data session
What do I need to do to have both screens use the same record pointer? Surely I don't need to pass a record number between screens?
Thanks in advance,
Joe
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
Assume : Using the same table / alias / workarea.
Moving record in one form will move in the other form.
I'm assuming you want first form to reflect the move in the second then you'll need to refresh that first form when you move record pointer on second form.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Monday, 29 February 2016 11:33 AM To: profoxtech@leafe.com Subject: How to allow multiple forms to update the same record pointer in a table
I have a form that displays basic information from a table in a list box with its row source as table fields. When the user clicks a record in the list box another form comes up with complete detail for the selected record displayed in text boxes with the table fields as their control source. The detail screen allows previous and next choices that move the record pointer. There is also an exit button to return to the previous screen.
Both forms are modal and use the default data session
What do I need to do to have both screens use the same record pointer? Surely I don't need to pass a record number between screens?
Thanks in advance,
Joe
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
[excessive quoting removed by server]
That all makes sense. I added wait window alias() and wait window select() statements in debug buttons on the forms. They all agree that the same table is selected in the same work area but the detail always comes up on record one and the calling form refreshes back to the same record it was on when the detail form was called. What else could I be overlooking?
Thanks,
Joe
On Sun, Feb 28, 2016 at 7:43 PM, Darren foxdev@ozemail.com.au wrote:
Assume : Using the same table / alias / workarea.
Moving record in one form will move in the other form.
I'm assuming you want first form to reflect the move in the second then you'll need to refresh that first form when you move record pointer on second form.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Monday, 29 February 2016 11:33 AM To: profoxtech@leafe.com Subject: How to allow multiple forms to update the same record pointer in a table
I have a form that displays basic information from a table in a list box with its row source as table fields. When the user clicks a record in the list box another form comes up with complete detail for the selected record displayed in text boxes with the table fields as their control source. The detail screen allows previous and next choices that move the record pointer. There is also an exit button to return to the previous screen.
Both forms are modal and use the default data session
What do I need to do to have both screens use the same record pointer? Surely I don't need to pass a record number between screens?
Thanks in advance,
Joe
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Joe
I just set up a very simple example to confirm behaviour and is as expected.
If the second form always comes up on the first record then something must be changing the record pointer. I'd put a breakpoint in the button / code where you launch the 2nd form and watch for a change in recno(<alias>) and see what the culprit is.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Monday, 29 February 2016 2:59 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
That all makes sense. I added wait window alias() and wait window select() statements in debug buttons on the forms. They all agree that the same table is selected in the same work area but the detail always comes up on record one and the calling form refreshes back to the same record it was on when the detail form was called. What else could I be overlooking?
Thanks,
Joe
On Sun, Feb 28, 2016 at 7:43 PM, Darren foxdev@ozemail.com.au wrote:
Assume : Using the same table / alias / workarea.
Moving record in one form will move in the other form.
I'm assuming you want first form to reflect the move in the second then you'll need to refresh that first form when you move record pointer on second form.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Monday, 29 February 2016 11:33 AM To: profoxtech@leafe.com Subject: How to allow multiple forms to update the same record pointer in a table
I have a form that displays basic information from a table in a list box with its row source as table fields. When the user clicks a record in the list box another form comes up with complete detail for the selected record displayed in text boxes with the table fields as their control source. The detail screen allows previous and next choices that move the record pointer. There is also an exit button to return to the previous screen.
Both forms are modal and use the default data session
What do I need to do to have both screens use the same record pointer? Surely I don't need to pass a record number between screens?
Thanks in advance,
Joe
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Hello joe:
You may need to use private session en form 2 or on both, so record pointers do not interfere between forms.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
Fernando - that's just the opposite of what Joe wants. He indeed wants Both forms to be looking at the same records - such that if he brings up the 2nd form - and Changes to a different record - then upon returning back to 1st form - it should now be looking at the Same record that Form2 was pointing to!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Fernando D. Bozzo Sent: Monday, February 29, 2016 1:16 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Hello joe:
You may need to use private session en form 2 or on both, so record pointers do not interfere between forms.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
[excessive quoting removed by server]
Thanks Kurt - your understanding is correct.
I have pinned down the problem to the detail form. When I call it something changes the record pointer to the first record. When the calling form gets control back the record pointer is where the detail form left it.
I have not been able to find any reason for this but wonder if it is related to the fact that the form was first created using the form wizard. I had grief with changing the table alias with that form so I opened a new form and copied the complete layout. That took care of table name but perhaps there is an "unwanted feature" still in place from its former life as a wizard created form. I'd rather not do the tedious work of regenerating the form - any ideas?
Thank you,
Joe
On Mon, Feb 29, 2016 at 9:21 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Fernando - that's just the opposite of what Joe wants. He indeed wants Both forms to be looking at the same records - such that if he brings up the 2nd form - and Changes to a different record - then upon returning back to 1st form - it should now be looking at the Same record that Form2 was pointing to!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Fernando D. Bozzo Sent: Monday, February 29, 2016 1:16 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Hello joe:
You may need to use private session en form 2 or on both, so record pointers do not interfere between forms.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Just a WAG - but, what is your DataSession property value for the Form? I think it should be set to "1-Default Data Session". That may be your problem if it says Private!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Monday, February 29, 2016 10:22 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks Kurt - your understanding is correct.
I have pinned down the problem to the detail form. When I call it something changes the record pointer to the first record. When the calling form gets control back the record pointer is where the detail form left it.
I have not been able to find any reason for this but wonder if it is related to the fact that the form was first created using the form wizard. I had grief with changing the table alias with that form so I opened a new form and copied the complete layout. That took care of table name but perhaps there is an "unwanted feature" still in place from its former life as a wizard created form. I'd rather not do the tedious work of regenerating the form - any ideas?
Thank you,
Joe
On Mon, Feb 29, 2016 at 9:21 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Fernando - that's just the opposite of what Joe wants. He indeed wants Both forms to be looking at the same records - such that if he brings up the 2nd form - and Changes to a different record - then upon returning back to 1st form - it should now be looking at the Same record that Form2 was pointing to!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Fernando D. Bozzo Sent: Monday, February 29, 2016 1:16 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Hello joe:
You may need to use private session en form 2 or on both, so record pointers do not interfere between forms.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Thanks for the idea Kurt but that was one of the first things I checked.
I have now determined that any form I call from the main form will always start at record 1 even if the record pointer is at a different value just before the call. If the called form changes the record pointer the pointer value will persist after the form closes. I have added a button to simply browse the table from the main form. That action respects the value of the pointer on entry and leaves the pointer in the proper place on exit.
There must be something about the forms I am using that causes this problem. I've been looking at the scx files and see that there is a some information about a cursor there. Is there a setting I need to change to get the behaviour I need? (I have done a test project where there is only one table and the behavior continues.)
Thanks for any ideas,
Joe
On Mon, Feb 29, 2016 at 11:31 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Just a WAG - but, what is your DataSession property value for the Form? I think it should be set to "1-Default Data Session". That may be your problem if it says Private!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Monday, February 29, 2016 10:22 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks Kurt - your understanding is correct.
I have pinned down the problem to the detail form. When I call it something changes the record pointer to the first record. When the calling form gets control back the record pointer is where the detail form left it.
I have not been able to find any reason for this but wonder if it is related to the fact that the form was first created using the form wizard. I had grief with changing the table alias with that form so I opened a new form and copied the complete layout. That took care of table name but perhaps there is an "unwanted feature" still in place from its former life as a wizard created form. I'd rather not do the tedious work of regenerating the form - any ideas?
Thank you,
Joe
On Mon, Feb 29, 2016 at 9:21 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Fernando - that's just the opposite of what Joe wants. He indeed wants Both forms to be looking at the same records - such that if he brings up the 2nd form - and Changes to a different record - then upon returning back to 1st form - it should now be looking at the Same record that Form2 was pointing to!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Fernando D. Bozzo Sent: Monday, February 29, 2016 1:16 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Hello joe:
You may need to use private session en form 2 or on both, so record pointers do not interfere between forms.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
I'm afraid I have forgotten the little I knew about setpoints and stepping in the debugger. I guess I need to read up on that. - Joe
On Mon, Feb 29, 2016 at 7:36 PM, Joe Yoder joe@wheypower.com wrote:
Thanks for the idea Kurt but that was one of the first things I checked.
I have now determined that any form I call from the main form will always start at record 1 even if the record pointer is at a different value just before the call. If the called form changes the record pointer the pointer value will persist after the form closes. I have added a button to simply browse the table from the main form. That action respects the value of the pointer on entry and leaves the pointer in the proper place on exit.
There must be something about the forms I am using that causes this problem. I've been looking at the scx files and see that there is a some information about a cursor there. Is there a setting I need to change to get the behaviour I need? (I have done a test project where there is only one table and the behavior continues.)
Thanks for any ideas,
Joe
On Mon, Feb 29, 2016 at 11:31 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Just a WAG - but, what is your DataSession property value for the Form? I think it should be set to "1-Default Data Session". That may be your problem if it says Private!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Monday, February 29, 2016 10:22 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks Kurt - your understanding is correct.
I have pinned down the problem to the detail form. When I call it something changes the record pointer to the first record. When the calling form gets control back the record pointer is where the detail form left it.
I have not been able to find any reason for this but wonder if it is related to the fact that the form was first created using the form wizard. I had grief with changing the table alias with that form so I opened a new form and copied the complete layout. That took care of table name but perhaps there is an "unwanted feature" still in place from its former life as a wizard created form. I'd rather not do the tedious work of regenerating the form - any ideas?
Thank you,
Joe
On Mon, Feb 29, 2016 at 9:21 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Fernando - that's just the opposite of what Joe wants. He indeed wants Both forms to be looking at the same records - such that if he brings up the 2nd form - and Changes to a different record - then upon returning back to 1st form - it should now be looking at the Same record that Form2 was pointing to!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Fernando D. Bozzo Sent: Monday, February 29, 2016 1:16 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Hello joe:
You may need to use private session en form 2 or on both, so record pointers do not interfere between forms.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
One way ...
SET STEP ON in the code that calls the 2nd form.
Go into the breakpoints setup. (Little hand symbol) Add a breakpoint - Type = "Break when expression has changed" In the expression put in RECNO ("<ALIAS>") The go back the command window and type in RESUME.
Something like that should get you going.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 11:38 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I'm afraid I have forgotten the little I knew about setpoints and stepping in the debugger. I guess I need to read up on that. - Joe
On Mon, Feb 29, 2016 at 7:36 PM, Joe Yoder joe@wheypower.com wrote:
Thanks for the idea Kurt but that was one of the first things I checked.
I have now determined that any form I call from the main form will always start at record 1 even if the record pointer is at a different value just before the call. If the called form changes the record pointer the pointer value will persist after the form closes. I have added a button to simply browse the table from the main form. That action respects the value of the pointer on entry and leaves the pointer
in the proper place on exit.
There must be something about the forms I am using that causes this problem. I've been looking at the scx files and see that there is a some information about a cursor there. Is there a setting I need to change to get the behaviour I need? (I have done a test project where there is only one table and the behavior continues.)
Thanks for any ideas,
Joe
On Mon, Feb 29, 2016 at 11:31 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Just a WAG - but, what is your DataSession property value for the Form? I think it should be set to "1-Default Data Session". That may be your problem if it says Private!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Monday, February 29, 2016 10:22 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks Kurt - your understanding is correct.
I have pinned down the problem to the detail form. When I call it something changes the record pointer to the first record. When the calling form gets control back the record pointer is where the detail
form left it.
I have not been able to find any reason for this but wonder if it is related to the fact that the form was first created using the form
wizard.
I had grief with changing the table alias with that form so I opened a new form and copied the complete layout. That took care of table name but perhaps there is an "unwanted feature" still in place from its former life as a wizard created form. I'd rather not do the tedious work of regenerating the form - any ideas?
Thank you,
Joe
On Mon, Feb 29, 2016 at 9:21 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Fernando - that's just the opposite of what Joe wants. He indeed wants Both forms to be looking at the same records - such that if he brings up the 2nd form - and Changes to a different record - then upon returning back to 1st form - it should now be looking at the Same record that Form2 was pointing to!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Fernando D. Bozzo Sent: Monday, February 29, 2016 1:16 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Hello joe:
You may need to use private session en form 2 or on both, so record pointers do not interfere between forms.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Thanks to your instructions I have done that and see that the pointer changes as soon as the "do form" line executes. I haven't figured out how to single step in the called form code. - Joe
On Mon, Feb 29, 2016 at 7:59 PM, Darren foxdev@ozemail.com.au wrote:
One way ...
SET STEP ON in the code that calls the 2nd form.
Go into the breakpoints setup. (Little hand symbol) Add a breakpoint - Type = "Break when expression has changed" In the expression put in RECNO ("<ALIAS>") The go back the command window and type in RESUME.
Something like that should get you going.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 11:38 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I'm afraid I have forgotten the little I knew about setpoints and stepping in the debugger. I guess I need to read up on that. - Joe
On Mon, Feb 29, 2016 at 7:36 PM, Joe Yoder joe@wheypower.com wrote:
Thanks for the idea Kurt but that was one of the first things I checked.
I have now determined that any form I call from the main form will always start at record 1 even if the record pointer is at a different value just before the call. If the called form changes the record pointer the pointer value will persist after the form closes. I have added a button to simply browse the table from the main form. That action respects the value of the pointer on entry and leaves the pointer
in the proper place on exit.
There must be something about the forms I am using that causes this problem. I've been looking at the scx files and see that there is a some information about a cursor there. Is there a setting I need to change to get the behaviour I need? (I have done a test project where there is only one table and the behavior continues.)
Thanks for any ideas,
Joe
On Mon, Feb 29, 2016 at 11:31 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Just a WAG - but, what is your DataSession property value for the Form? I think it should be set to "1-Default Data Session". That may be your problem if it says Private!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Monday, February 29, 2016 10:22 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks Kurt - your understanding is correct.
I have pinned down the problem to the detail form. When I call it something changes the record pointer to the first record. When the calling form gets control back the record pointer is where the detail
form left it.
I have not been able to find any reason for this but wonder if it is related to the fact that the form was first created using the form
wizard.
I had grief with changing the table alias with that form so I opened a new form and copied the complete layout. That took care of table name but perhaps there is an "unwanted feature" still in place from its former life as a wizard created form. I'd rather not do the tedious work of regenerating the form - any ideas?
Thank you,
Joe
On Mon, Feb 29, 2016 at 9:21 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Fernando - that's just the opposite of what Joe wants. He indeed wants Both forms to be looking at the same records - such that if he brings up the 2nd form - and Changes to a different record - then upon returning back to 1st form - it should now be looking at the Same record that Form2 was pointing to!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Fernando D. Bozzo Sent: Monday, February 29, 2016 1:16 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Hello joe:
You may need to use private session en form 2 or on both, so record pointers do not interfere between forms.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Put the SET STEP immediately before the do form.
Then on the toolbar click on the symbol with the arrow going into the brackets. Do that repeatedly and you'll go one line at a time. You'll get the idea.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 1:15 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks to your instructions I have done that and see that the pointer changes as soon as the "do form" line executes. I haven't figured out how to single step in the called form code. - Joe
On Mon, Feb 29, 2016 at 7:59 PM, Darren foxdev@ozemail.com.au wrote:
One way ...
SET STEP ON in the code that calls the 2nd form.
Go into the breakpoints setup. (Little hand symbol) Add a breakpoint
- Type = "Break when expression has changed"
In the expression put in RECNO ("<ALIAS>") The go back the command window and type in RESUME.
Something like that should get you going.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 11:38 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I'm afraid I have forgotten the little I knew about setpoints and stepping in the debugger. I guess I need to read up on that. - Joe
On Mon, Feb 29, 2016 at 7:36 PM, Joe Yoder joe@wheypower.com wrote:
Thanks for the idea Kurt but that was one of the first things I checked.
I have now determined that any form I call from the main form will always start at record 1 even if the record pointer is at a different value just before the call. If the called form changes the record pointer the pointer value will persist after the form closes. I have added a button to simply browse the table from the main form. That action respects the value of the pointer on entry and leaves the pointer
in the proper place on exit.
There must be something about the forms I am using that causes this problem. I've been looking at the scx files and see that there is a some information about a cursor there. Is there a setting I need to change to get the behaviour I need? (I have done a test project where there is only one table and the behavior continues.)
Thanks for any ideas,
Joe
On Mon, Feb 29, 2016 at 11:31 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Just a WAG - but, what is your DataSession property value for the Form? I think it should be set to "1-Default Data Session". That may be your problem if it says Private!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Monday, February 29, 2016 10:22 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks Kurt - your understanding is correct.
I have pinned down the problem to the detail form. When I call it something changes the record pointer to the first record. When the calling form gets control back the record pointer is where the detail
form left it.
I have not been able to find any reason for this but wonder if it is related to the fact that the form was first created using the form
wizard.
I had grief with changing the table alias with that form so I opened a new form and copied the complete layout. That took care of table name but perhaps there is an "unwanted feature" still in place from its former life as a wizard created form. I'd rather not do the tedious work of regenerating the form - any ideas?
Thank you,
Joe
On Mon, Feb 29, 2016 at 9:21 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Fernando - that's just the opposite of what Joe wants. He indeed wants Both forms to be looking at the same records - such that if he brings up the 2nd form - and Changes to a different record - then upon returning back to 1st form - it should now be looking at the Same record that Form2 was pointing to!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Fernando D. Bozzo Sent: Monday, February 29, 2016 1:16 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Hello joe:
You may need to use private session en form 2 or on both, so record pointers do not interfere between forms.
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept) text/html
[excessive quoting removed by server]
I use a test button on the main form to set the record pointer to 25. As soon as I step into either of the Do Form lines the recno() changes back to a red 1 without the watch firing. The debugger shows that it is still in the click method of the command button that did the call.
There must be something I as a dabbler am doing differently than experienced developers - what can it be?
I have changed everything except the data file I am trying to display and the behavior persists. Perhaps tomorrow I will use a different data file as well.
Thanks to all for the input so far!
Joe
On Mon, Feb 29, 2016 at 9:21 PM, Darren foxdev@ozemail.com.au wrote:
Put the SET STEP immediately before the do form.
Then on the toolbar click on the symbol with the arrow going into the brackets. Do that repeatedly and you'll go one line at a time. You'll get the idea.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 1:15 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks to your instructions I have done that and see that the pointer changes as soon as the "do form" line executes. I haven't figured out how to single step in the called form code. - Joe
On Mon, Feb 29, 2016 at 7:59 PM, Darren foxdev@ozemail.com.au wrote:
One way ...
SET STEP ON in the code that calls the 2nd form.
Go into the breakpoints setup. (Little hand symbol) Add a breakpoint
- Type = "Break when expression has changed"
In the expression put in RECNO ("<ALIAS>") The go back the command window and type in RESUME.
Something like that should get you going.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 11:38 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I'm afraid I have forgotten the little I knew about setpoints and stepping in the debugger. I guess I need to read up on that. - Joe
On Mon, Feb 29, 2016 at 7:36 PM, Joe Yoder joe@wheypower.com wrote:
Thanks for the idea Kurt but that was one of the first things I
checked.
I have now determined that any form I call from the main form will always start at record 1 even if the record pointer is at a different value just before the call. If the called form changes the record pointer the pointer value will persist after the form closes. I have added a button to simply browse the table from the main form. That action respects the value of the pointer on entry and leaves the pointer
in the proper place on exit.
There must be something about the forms I am using that causes this problem. I've been looking at the scx files and see that there is a some information about a cursor there. Is there a setting I need to change to get the behaviour I need? (I have done a test project where there is only one table and the behavior continues.)
Thanks for any ideas,
Joe
On Mon, Feb 29, 2016 at 11:31 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Just a WAG - but, what is your DataSession property value for the Form? I think it should be set to "1-Default Data Session". That may be your problem if it says Private!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Monday, February 29, 2016 10:22 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks Kurt - your understanding is correct.
I have pinned down the problem to the detail form. When I call it something changes the record pointer to the first record. When the calling form gets control back the record pointer is where the detail
form left it.
I have not been able to find any reason for this but wonder if it is related to the fact that the form was first created using the form
wizard.
I had grief with changing the table alias with that form so I opened a new form and copied the complete layout. That took care of table name but perhaps there is an "unwanted feature" still in place from its former life as a wizard created form. I'd rather not do the tedious work of regenerating the form - any ideas?
Thank you,
Joe
On Mon, Feb 29, 2016 at 9:21 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Fernando - that's just the opposite of what Joe wants. He indeed wants Both forms to be looking at the same records - such that if he brings up the 2nd form - and Changes to a different record - then upon returning back to 1st form - it should now be looking at the Same record that Form2 was pointing to!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Fernando D. Bozzo Sent: Monday, February 29, 2016 1:16 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Hello joe:
You may need to use private session en form 2 or on both, so record pointers do not interfere between forms.
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Joe if you want it zip it all up and send it to me I'll have a look see for you.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 4:33 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I use a test button on the main form to set the record pointer to 25. As soon as I step into either of the Do Form lines the recno() changes back to a red 1 without the watch firing. The debugger shows that it is still in the click method of the command button that did the call.
There must be something I as a dabbler am doing differently than experienced developers - what can it be?
I have changed everything except the data file I am trying to display and the behavior persists. Perhaps tomorrow I will use a different data file as well.
Thanks to all for the input so far!
Joe
On Mon, Feb 29, 2016 at 9:21 PM, Darren foxdev@ozemail.com.au wrote:
Put the SET STEP immediately before the do form.
Then on the toolbar click on the symbol with the arrow going into the brackets. Do that repeatedly and you'll go one line at a time. You'll get the idea.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 1:15 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks to your instructions I have done that and see that the pointer changes as soon as the "do form" line executes. I haven't figured out how to single step in the called form code. - Joe
On Mon, Feb 29, 2016 at 7:59 PM, Darren foxdev@ozemail.com.au wrote:
One way ...
SET STEP ON in the code that calls the 2nd form.
Go into the breakpoints setup. (Little hand symbol) Add a breakpoint
- Type = "Break when expression has changed"
In the expression put in RECNO ("<ALIAS>") The go back the command window and type in RESUME.
Something like that should get you going.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 11:38 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I'm afraid I have forgotten the little I knew about setpoints and stepping in the debugger. I guess I need to read up on that. - Joe
On Mon, Feb 29, 2016 at 7:36 PM, Joe Yoder joe@wheypower.com wrote:
Thanks for the idea Kurt but that was one of the first things I
checked.
I have now determined that any form I call from the main form will always start at record 1 even if the record pointer is at a different value just before the call. If the called form changes the record pointer the pointer value will persist after the form closes. I have added a button to simply browse the table from the main form. That action respects the value of the pointer on entry and leaves the pointer
in the proper place on exit.
There must be something about the forms I am using that causes this problem. I've been looking at the scx files and see that there is a some information about a cursor there. Is there a setting I need to change to get the behaviour I need? (I have done a test project where there is only one table and the behavior continues.)
Thanks for any ideas,
Joe
On Mon, Feb 29, 2016 at 11:31 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Just a WAG - but, what is your DataSession property value for the Form? I think it should be set to "1-Default Data Session". That may be your problem if it says Private!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Monday, February 29, 2016 10:22 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks Kurt - your understanding is correct.
I have pinned down the problem to the detail form. When I call it something changes the record pointer to the first record. When the calling form gets control back the record pointer is where the detail
form left it.
I have not been able to find any reason for this but wonder if it is related to the fact that the form was first created using the form
wizard.
I had grief with changing the table alias with that form so I opened a new form and copied the complete layout. That took care of table name but perhaps there is an "unwanted feature" still in place from its former life as a wizard created form. I'd rather not do the tedious work of regenerating the form - any ideas?
Thank you,
Joe
On Mon, Feb 29, 2016 at 9:21 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Fernando - that's just the opposite of what Joe wants. He indeed wants Both forms to be looking at the same records - such that if he brings up the 2nd form - and Changes to a different record - then upon returning back to 1st form - it should now be looking at the Same record that Form2 was pointing
to!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Fernando D. Bozzo Sent: Monday, February 29, 2016 1:16 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Hello joe:
You may need to use private session en form 2 or on both, so record pointers do not interfere between forms.
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept) text/html
[excessive quoting removed by server]
I may be a little late on this thread but this is how I do it: I set a form property in form1 called nRec which captures the recno() you are positioned in: thisform.nRec = recno('yourcursor') you set a new property in that form called nRec_1 When you call form2: do form2 with thisform.nRec to thisform.nRec_1
In the init event of form2: lparameters pnRec (you also set a property called nRec or whatever you like in form2, to receive the number of the record in form1) thisform.nRec = pnRec in the activate event of form2: select thecursorlocate for recno() = thisform.nRec In this way, form2 is positioned in the same record you are positioned in form1 (I assume you examine the record in a grid here)
in the afterrowcolchange event of the grid thisform.nRec = recno('thecursor')
If you were to move the recordpointer in form2, or even if you weren't, its unload event should have the following code:
return thisform.nRec Now, back to form1In its activate event do this: select yourcursorlocate for recno() = thisform.nRec_1 So now, the record pointer is in the same record that form2 is in. In your particular case you might want to add some control property to avoid error in the activate event of form1, such as: if (condition) select yourcursor locate for recno() = thisform.nRec_1 endif Needless to say that both forms should have private data sessions Hope it helps Rafael Copquin
El Martes, 1 de marzo, 2016 3:30:05, Darren foxdev@ozemail.com.au escribió:
Joe if you want it zip it all up and send it to me I'll have a look see for you.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 4:33 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I use a test button on the main form to set the record pointer to 25. As soon as I step into either of the Do Form lines the recno() changes back to a red 1 without the watch firing. The debugger shows that it is still in the click method of the command button that did the call.
There must be something I as a dabbler am doing differently than experienced developers - what can it be?
I have changed everything except the data file I am trying to display and the behavior persists. Perhaps tomorrow I will use a different data file as well.
Thanks to all for the input so far!
Joe
On Mon, Feb 29, 2016 at 9:21 PM, Darren foxdev@ozemail.com.au wrote:
Put the SET STEP immediately before the do form.
Then on the toolbar click on the symbol with the arrow going into the brackets. Do that repeatedly and you'll go one line at a time. You'll get the idea.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 1:15 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks to your instructions I have done that and see that the pointer changes as soon as the "do form" line executes. I haven't figured out how to single step in the called form code. - Joe
On Mon, Feb 29, 2016 at 7:59 PM, Darren foxdev@ozemail.com.au wrote:
One way ...
SET STEP ON in the code that calls the 2nd form.
Go into the breakpoints setup. (Little hand symbol) Add a breakpoint
- Type = "Break when expression has changed"
In the expression put in RECNO ("<ALIAS>") The go back the command window and type in RESUME.
Something like that should get you going.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 11:38 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I'm afraid I have forgotten the little I knew about setpoints and stepping in the debugger. I guess I need to read up on that. - Joe
On Mon, Feb 29, 2016 at 7:36 PM, Joe Yoder joe@wheypower.com wrote:
Thanks for the idea Kurt but that was one of the first things I
checked.
I have now determined that any form I call from the main form will always start at record 1 even if the record pointer is at a different value just before the call. If the called form changes the record pointer the pointer value will persist after the form closes. I have added a button to simply browse the table from the main form. That action respects the value of the pointer on entry and leaves the pointer
in the proper place on exit.
There must be something about the forms I am using that causes this problem. I've been looking at the scx files and see that there is a some information about a cursor there. Is there a setting I need to change to get the behaviour I need? (I have done a test project where there is only one table and the behavior continues.)
Thanks for any ideas,
Joe
On Mon, Feb 29, 2016 at 11:31 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Just a WAG - but, what is your DataSession property value for the Form? I think it should be set to "1-Default Data Session". That may be your problem if it says Private!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Monday, February 29, 2016 10:22 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks Kurt - your understanding is correct.
I have pinned down the problem to the detail form. When I call it something changes the record pointer to the first record. When the calling form gets control back the record pointer is where the detail
form left it.
I have not been able to find any reason for this but wonder if it is related to the fact that the form was first created using the form
wizard.
I had grief with changing the table alias with that form so I opened a new form and copied the complete layout. That took care of table name but perhaps there is an "unwanted feature" still in place from its former life as a wizard created form. I'd rather not do the tedious work of regenerating the form - any ideas?
Thank you,
Joe
On Mon, Feb 29, 2016 at 9:21 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Fernando - that's just the opposite of what Joe wants. He indeed wants Both forms to be looking at the same records - such that if he brings up the 2nd form - and Changes to a different record - then upon returning back to 1st form - it should now be looking at the Same record that Form2 was pointing
to!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Fernando D. Bozzo Sent: Monday, February 29, 2016 1:16 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Hello joe:
You may need to use private session en form 2 or on both, so record pointers do not interfere between forms.
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Darren and Rafael https://plus.google.com/u/0/114211264208955698806?prsrc=4I was thinking of passing the record number between forms but understood that it should not be necessary. I plan to build a very simple demo app from scratch. If that exercise doesn't shake out the problem I will zip it up and let you have a look.
Thanks - Joe
On Tue, Mar 1, 2016 at 2:44 AM, rcopquin@fibertel.com.ar wrote:
I may be a little late on this thread but this is how I do it: I set a form property in form1 called nRec which captures the recno() you are positioned in: thisform.nRec = recno('yourcursor') you set a new property in that form called nRec_1 When you call form2: do form2 with thisform.nRec to thisform.nRec_1
In the init event of form2: lparameters pnRec (you also set a property called nRec or whatever you like in form2, to receive the number of the record in form1) thisform.nRec = pnRec in the activate event of form2: select thecursorlocate for recno() = thisform.nRec In this way, form2 is positioned in the same record you are positioned in form1 (I assume you examine the record in a grid here)
in the afterrowcolchange event of the grid thisform.nRec = recno('thecursor')
If you were to move the recordpointer in form2, or even if you weren't, its unload event should have the following code:
return thisform.nRec Now, back to form1In its activate event do this: select yourcursorlocate for recno() = thisform.nRec_1 So now, the record pointer is in the same record that form2 is in. In your particular case you might want to add some control property to avoid error in the activate event of form1, such as: if (condition) select yourcursor locate for recno() = thisform.nRec_1 endif Needless to say that both forms should have private data sessions Hope it helps Rafael Copquin
El Martes, 1 de marzo, 2016 3:30:05, Darren <foxdev@ozemail.com.au>escribió:
Joe if you want it zip it all up and send it to me I'll have a look see for you.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 4:33 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I use a test button on the main form to set the record pointer to 25. As soon as I step into either of the Do Form lines the recno() changes back to a red 1 without the watch firing. The debugger shows that it is still in the click method of the command button that did the call.
There must be something I as a dabbler am doing differently than experienced developers - what can it be?
I have changed everything except the data file I am trying to display and the behavior persists. Perhaps tomorrow I will use a different data file as well.
Thanks to all for the input so far!
Joe
On Mon, Feb 29, 2016 at 9:21 PM, Darren foxdev@ozemail.com.au wrote:
Put the SET STEP immediately before the do form.
Then on the toolbar click on the symbol with the arrow going into the brackets. Do that repeatedly and you'll go one line at a time. You'll get the idea.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 1:15 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks to your instructions I have done that and see that the pointer changes as soon as the "do form" line executes. I haven't figured out how to single step in the called form code. - Joe
On Mon, Feb 29, 2016 at 7:59 PM, Darren foxdev@ozemail.com.au wrote:
One way ...
SET STEP ON in the code that calls the 2nd form.
Go into the breakpoints setup. (Little hand symbol) Add a breakpoint
- Type = "Break when expression has changed"
In the expression put in RECNO ("<ALIAS>") The go back the command window and type in RESUME.
Something like that should get you going.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 11:38 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I'm afraid I have forgotten the little I knew about setpoints and stepping in the debugger. I guess I need to read up on that. - Joe
On Mon, Feb 29, 2016 at 7:36 PM, Joe Yoder joe@wheypower.com wrote:
Thanks for the idea Kurt but that was one of the first things I
checked.
I have now determined that any form I call from the main form will always start at record 1 even if the record pointer is at a different value just before the call. If the called form changes the record pointer the pointer value will persist after the form closes. I have added a button to simply browse the table from the main form. That action respects the value of the pointer on entry and leaves the pointer
in the proper place on exit.
There must be something about the forms I am using that causes this problem. I've been looking at the scx files and see that there is a some information about a cursor there. Is there a setting I need to change to get the behaviour I need? (I have done a test project where there is only one table and the behavior continues.)
Thanks for any ideas,
Joe
On Mon, Feb 29, 2016 at 11:31 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Just a WAG - but, what is your DataSession property value for the Form? I think it should be set to "1-Default Data Session". That may be your problem if it says Private!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Monday, February 29, 2016 10:22 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks Kurt - your understanding is correct.
I have pinned down the problem to the detail form. When I call it something changes the record pointer to the first record. When the calling form gets control back the record pointer is where the detail
form left it.
I have not been able to find any reason for this but wonder if it is related to the fact that the form was first created using the form
wizard.
I had grief with changing the table alias with that form so I opened a new form and copied the complete layout. That took care of table name but perhaps there is an "unwanted feature" still in place from its former life as a wizard created form. I'd rather not do the tedious work of regenerating the form - any ideas?
Thank you,
Joe
On Mon, Feb 29, 2016 at 9:21 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Fernando - that's just the opposite of what Joe wants. He indeed wants Both forms to be looking at the same records - such that if he brings up the 2nd form - and Changes to a different record - then upon returning back to 1st form - it should now be looking at the Same record that Form2 was pointing
to!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Fernando D. Bozzo Sent: Monday, February 29, 2016 1:16 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Hello joe:
You may need to use private session en form 2 or on both, so record pointers do not interfere between forms.
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Joe - I completely agree with you - that it shouldn't be necessary.
As another WAG - do you have anything in a Data Environment on either the 1st form - or the 2nd form that is called?
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, March 01, 2016 7:48 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Darren and Rafael https://plus.google.com/u/0/114211264208955698806?prsrc=4I was thinking of passing the record number between forms but understood that it should not be necessary. I plan to build a very simple demo app from scratch. If that exercise doesn't shake out the problem I will zip it up and let you have a look.
Thanks - Joe
On Tue, Mar 1, 2016 at 2:44 AM, rcopquin@fibertel.com.ar wrote:
I may be a little late on this thread but this is how I do it: I set a form property in form1 called nRec which captures the recno() you are positioned in: thisform.nRec = recno('yourcursor') you set a new property in that form called nRec_1 When you call form2: do form2 with thisform.nRec to thisform.nRec_1
In the init event of form2: lparameters pnRec (you also set a property called nRec or whatever you like in form2, to receive the number of the record in form1) thisform.nRec = pnRec in the activate event of form2: select thecursorlocate for recno() = thisform.nRec In this way, form2 is positioned in the same record you are positioned in form1 (I assume you examine the record in a grid here)
in the afterrowcolchange event of the grid thisform.nRec = recno('thecursor')
If you were to move the recordpointer in form2, or even if you weren't, its unload event should have the following code:
return thisform.nRec Now, back to form1In its activate event do this: select yourcursorlocate for recno() = thisform.nRec_1 So now, the record pointer is in the same record that form2 is in. In your particular case you might want to add some control property to avoid error in the activate event of form1, such as: if (condition) select yourcursor locate for recno() = thisform.nRec_1 endif Needless to say that both forms should have private data sessions Hope it helps Rafael Copquin
El Martes, 1 de marzo, 2016 3:30:05, Darrenfoxdev@ozemail.com.au escribió:
Joe if you want it zip it all up and send it to me I'll have a look see for you.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 4:33 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I use a test button on the main form to set the record pointer to 25. As soon as I step into either of the Do Form lines the recno() changes back to a red 1 without the watch firing. The debugger shows that it is still in the click method of the command button that did the call.
There must be something I as a dabbler am doing differently than experienced developers - what can it be?
I have changed everything except the data file I am trying to display and the behavior persists. Perhaps tomorrow I will use a different data file as well.
Thanks to all for the input so far!
Joe
On Mon, Feb 29, 2016 at 9:21 PM, Darren foxdev@ozemail.com.au wrote:
Put the SET STEP immediately before the do form.
Then on the toolbar click on the symbol with the arrow going into the brackets. Do that repeatedly and you'll go one line at a time. You'll get the idea.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 1:15 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks to your instructions I have done that and see that the pointer changes as soon as the "do form" line executes. I haven't figured out how to single step in the called form code. - Joe
On Mon, Feb 29, 2016 at 7:59 PM, Darren foxdev@ozemail.com.au wrote:
One way ...
SET STEP ON in the code that calls the 2nd form.
Go into the breakpoints setup. (Little hand symbol) Add a breakpoint
- Type = "Break when expression has changed"
In the expression put in RECNO ("<ALIAS>") The go back the command window and type in RESUME.
Something like that should get you going.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 11:38 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I'm afraid I have forgotten the little I knew about setpoints and stepping in the debugger. I guess I need to read up on that. - Joe
On Mon, Feb 29, 2016 at 7:36 PM, Joe Yoder joe@wheypower.com wrote:
Thanks for the idea Kurt but that was one of the first things I
checked.
I have now determined that any form I call from the main form will always start at record 1 even if the record pointer is at a different value just before the call. If the called form changes the record pointer the pointer value will persist after the form closes. I have added a button to simply browse the table from the main form. That action respects the value of the pointer on entry and leaves the pointer
in the proper place on exit.
There must be something about the forms I am using that causes this problem. I've been looking at the scx files and see that there is a some information about a cursor there. Is there a setting I need to change to get the behaviour I need? (I have done a test project where there is only one table and the behavior continues.)
Thanks for any ideas,
Joe
On Mon, Feb 29, 2016 at 11:31 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Just a WAG - but, what is your DataSession property value for the Form? I think it should be set to "1-Default Data Session". That may be your problem if it says Private!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Monday, February 29, 2016 10:22 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks Kurt - your understanding is correct.
I have pinned down the problem to the detail form. When I call it something changes the record pointer to the first record. When the calling form gets control back the record pointer is where the detail
form left it.
I have not been able to find any reason for this but wonder if it is related to the fact that the form was first created using the form
wizard.
I had grief with changing the table alias with that form so I opened a new form and copied the complete layout. That took care of table name but perhaps there is an "unwanted feature" still in place from its former life as a wizard created form. I'd rather not do the tedious work of regenerating the form - any ideas?
Thank you,
Joe
On Mon, Feb 29, 2016 at 9:21 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Fernando - that's just the opposite of what Joe wants. He indeed wants Both forms to be looking at the same records - such that if he brings up the 2nd form - and Changes to a different record - then upon returning back to 1st form - it should now be looking at the Same record that Form2 was pointing
to!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Fernando D. Bozzo Sent: Monday, February 29, 2016 1:16 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Hello joe:
You may need to use private session en form 2 or on both, so record pointers do not interfere between forms.
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept) text/html
[excessive quoting removed by server]
_______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CABQeDnVDX47KRK2-FuwN8cOHd=Mafc_74Duv... ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious. Report [OT] Abuse: http://leafe.com/reportAbuse/CABQeDnVDX47KRK2-FuwN8cOHd=Mafc_74DuvAfgK_BVuZO...
The data environment on each form shows only the one table in the system. Apparently this value gets created when the form is created. I have not figured out a way to delete it.
I have the simple demo created and could zip it up to send to whoever is willing to look at it but I am wondering how it would work to share the folder on Google drive with a link embedded in an Email. Does anyone have experience or an opinion about such an approach? - Joe
On Tue, Mar 1, 2016 at 9:06 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Joe - I completely agree with you - that it shouldn't be necessary.
As another WAG - do you have anything in a Data Environment on either the 1st form - or the 2nd form that is called?
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, March 01, 2016 7:48 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Darren and Rafael https://plus.google.com/u/0/114211264208955698806?prsrc=4I was thinking of passing the record number between forms but understood that it should not be necessary. I plan to build a very simple demo app from scratch. If that exercise doesn't shake out the problem I will zip it up and let you have a look.
Thanks - Joe
On Tue, Mar 1, 2016 at 2:44 AM, rcopquin@fibertel.com.ar wrote:
I may be a little late on this thread but this is how I do it: I set a form property in form1 called nRec which captures the recno() you are positioned in: thisform.nRec = recno('yourcursor') you set a new property in that form called nRec_1 When you call form2: do form2 with thisform.nRec to thisform.nRec_1
In the init event of form2: lparameters pnRec (you also set a property called nRec or whatever you like in form2, to receive the number of the record in form1) thisform.nRec = pnRec in the activate event of form2: select thecursorlocate for recno() = thisform.nRec In this way, form2 is positioned in the same record you are positioned in form1 (I assume you examine the record in a grid here)
in the afterrowcolchange event of the grid thisform.nRec = recno('thecursor')
If you were to move the recordpointer in form2, or even if you weren't, its unload event should have the following code:
return thisform.nRec Now, back to form1In its activate event do this: select yourcursorlocate for recno() = thisform.nRec_1 So now, the record pointer is in the same record that form2 is in. In your particular case you might want to add some control property to avoid error in the activate event of form1, such as: if (condition) select yourcursor locate for recno() = thisform.nRec_1 endif Needless to say that both forms should have private data sessions Hope it helps Rafael Copquin
El Martes, 1 de marzo, 2016 3:30:05, Darrenfoxdev@ozemail.com.au escribió:
Joe if you want it zip it all up and send it to me I'll have a look see for you.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 4:33 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I use a test button on the main form to set the record pointer to 25. As soon as I step into either of the Do Form lines the recno() changes back to a red 1 without the watch firing. The debugger shows that it is still in the click method of the command button that did the call.
There must be something I as a dabbler am doing differently than experienced developers - what can it be?
I have changed everything except the data file I am trying to display and the behavior persists. Perhaps tomorrow I will use a different data file as well.
Thanks to all for the input so far!
Joe
On Mon, Feb 29, 2016 at 9:21 PM, Darren foxdev@ozemail.com.au wrote:
Put the SET STEP immediately before the do form.
Then on the toolbar click on the symbol with the arrow going into the brackets. Do that repeatedly and you'll go one line at a time. You'll get the idea.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 1:15 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks to your instructions I have done that and see that the pointer changes as soon as the "do form" line executes. I haven't figured out how to single step in the called form code. - Joe
On Mon, Feb 29, 2016 at 7:59 PM, Darren foxdev@ozemail.com.au wrote:
One way ...
SET STEP ON in the code that calls the 2nd form.
Go into the breakpoints setup. (Little hand symbol) Add a breakpoint
- Type = "Break when expression has changed"
In the expression put in RECNO ("<ALIAS>") The go back the command window and type in RESUME.
Something like that should get you going.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 11:38 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I'm afraid I have forgotten the little I knew about setpoints and stepping in the debugger. I guess I need to read up on that. - Joe
On Mon, Feb 29, 2016 at 7:36 PM, Joe Yoder joe@wheypower.com
wrote:
Thanks for the idea Kurt but that was one of the first things I
checked.
I have now determined that any form I call from the main form will always start at record 1 even if the record pointer is at a different value just before the call. If the called form changes the record pointer the pointer value will persist after the form closes. I have added a button to simply browse the table from the main form. That action respects the value of the pointer on entry and leaves the pointer
in the proper place on exit.
There must be something about the forms I am using that causes this problem. I've been looking at the scx files and see that there is a some information about a cursor there. Is there a setting I need to change to get the behaviour I need? (I have done a test project where there is only one table and the behavior continues.)
Thanks for any ideas,
Joe
On Mon, Feb 29, 2016 at 11:31 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Just a WAG - but, what is your DataSession property value for the Form? I think it should be set to "1-Default Data Session". That may be your problem if it says Private!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Monday, February 29, 2016 10:22 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks Kurt - your understanding is correct.
I have pinned down the problem to the detail form. When I call it something changes the record pointer to the first record. When the calling form gets control back the record pointer is where the detail
form left it.
I have not been able to find any reason for this but wonder if it is related to the fact that the form was first created using the form
wizard.
I had grief with changing the table alias with that form so I opened a new form and copied the complete layout. That took care of table name but perhaps there is an "unwanted feature" still in place from its former life as a wizard created form. I'd rather not do the tedious work of regenerating the form - any
ideas?
Thank you,
Joe
On Mon, Feb 29, 2016 at 9:21 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
> Fernando - that's just the opposite of what Joe wants. He > indeed wants Both forms to be looking at the same records - > such that if he brings up the 2nd form - and Changes to a > different record - then upon returning back to 1st form - it > should now be looking at the Same record that Form2 was > pointing
to!
> > Regards, > Kurt Wendt > Consultant > > > Tel. +1-212-747-9100 > www.GlobeTax.com > > > -----Original Message----- > From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On > Behalf Of Fernando D. Bozzo > Sent: Monday, February 29, 2016 1:16 AM > To: profoxtech@leafe.com > Subject: Re: How to allow multiple forms to update the same > record pointer in a table > > Hello joe: > > You may need to use private session en form 2 or on both, so > record pointers do not interfere between forms. > > > --- StripMime Report -- processed MIME parts ---
multipart/alternative
> text/plain (text body -- kept) text/html > --- >
[excessive quoting removed by server]
Joe - I believe that's your problem - re: " data environment on each form shows only the one table."
If you open the form, right click on an Empty space on the form, then select Data Environment. At that point the graphical version of the DE comes up - and you should be able to simply select that Table (the graphical representation of that Table) - and just hit Delete. That should be all there is too it. Then - you would manually open the file in like the Init or Load of the form. I think that May solve your problem...
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, March 01, 2016 12:25 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
The data environment on each form shows only the one table in the system. Apparently this value gets created when the form is created. I have not figured out a way to delete it.
I have the simple demo created and could zip it up to send to whoever is willing to look at it but I am wondering how it would work to share the folder on Google drive with a link embedded in an Email. Does anyone have experience or an opinion about such an approach? - Joe
On Tue, Mar 1, 2016 at 9:06 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Joe - I completely agree with you - that it shouldn't be necessary.
As another WAG - do you have anything in a Data Environment on either the 1st form - or the 2nd form that is called?
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, March 01, 2016 7:48 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Darren and Rafael https://plus.google.com/u/0/114211264208955698806?prsrc=4I was thinking of passing the record number between forms but understood that it should not be necessary. I plan to build a very simple demo app from scratch. If that exercise doesn't shake out the problem I will zip it up and let you have a look.
Thanks - Joe
On Tue, Mar 1, 2016 at 2:44 AM, rcopquin@fibertel.com.ar wrote:
I may be a little late on this thread but this is how I do it: I set a form property in form1 called nRec which captures the recno() you are positioned in: thisform.nRec = recno('yourcursor') you set a new property in that form called nRec_1 When you call form2: do form2 with thisform.nRec to thisform.nRec_1
In the init event of form2: lparameters pnRec (you also set a property called nRec or whatever you like in form2, to receive the number of the record in form1) thisform.nRec = pnRec in the activate event of form2: select thecursorlocate for recno() = thisform.nRec In this way, form2 is positioned in the same record you are positioned in form1 (I assume you examine the record in a grid here)
in the afterrowcolchange event of the grid thisform.nRec = recno('thecursor')
If you were to move the recordpointer in form2, or even if you weren't, its unload event should have the following code:
return thisform.nRec Now, back to form1In its activate event do this: select yourcursorlocate for recno() = thisform.nRec_1 So now, the record pointer is in the same record that form2 is in. In your particular case you might want to add some control property to avoid error in the activate event of form1, such as: if (condition) select yourcursor locate for recno() = thisform.nRec_1 endif Needless to say that both forms should have private data sessions Hope it helps Rafael Copquin
El Martes, 1 de marzo, 2016 3:30:05, Darrenfoxdev@ozemail.com.au escribió:
Joe if you want it zip it all up and send it to me I'll have a look see for you.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 4:33 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I use a test button on the main form to set the record pointer to 25. As soon as I step into either of the Do Form lines the recno() changes back to a red 1 without the watch firing. The debugger shows that it is still in the click method of the command button that did the call.
There must be something I as a dabbler am doing differently than experienced developers - what can it be?
I have changed everything except the data file I am trying to display and the behavior persists. Perhaps tomorrow I will use a different data file as well.
Thanks to all for the input so far!
Joe
On Mon, Feb 29, 2016 at 9:21 PM, Darren foxdev@ozemail.com.au wrote:
Put the SET STEP immediately before the do form.
Then on the toolbar click on the symbol with the arrow going into the brackets. Do that repeatedly and you'll go one line at a time. You'll get the idea.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 1:15 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks to your instructions I have done that and see that the pointer changes as soon as the "do form" line executes. I haven't figured out how to single step in the called form code. - Joe
On Mon, Feb 29, 2016 at 7:59 PM, Darren foxdev@ozemail.com.au wrote:
One way ...
SET STEP ON in the code that calls the 2nd form.
Go into the breakpoints setup. (Little hand symbol) Add a breakpoint
- Type = "Break when expression has changed"
In the expression put in RECNO ("<ALIAS>") The go back the command window and type in RESUME.
Something like that should get you going.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 11:38 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I'm afraid I have forgotten the little I knew about setpoints and stepping in the debugger. I guess I need to read up on that. - Joe
On Mon, Feb 29, 2016 at 7:36 PM, Joe Yoder joe@wheypower.com
wrote:
Thanks for the idea Kurt but that was one of the first things I
checked.
I have now determined that any form I call from the main form will always start at record 1 even if the record pointer is at a different value just before the call. If the called form changes the record pointer the pointer value will persist after the form closes. I have added a button to simply browse the table from the main form. That action respects the value of the pointer on entry and leaves the pointer
in the proper place on exit.
There must be something about the forms I am using that causes this problem. I've been looking at the scx files and see that there is a some information about a cursor there. Is there a setting I need to change to get the behaviour I need? (I have done a test project where there is only one table and the behavior continues.)
Thanks for any ideas,
Joe
On Mon, Feb 29, 2016 at 11:31 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Just a WAG - but, what is your DataSession property value for the Form? I think it should be set to "1-Default Data Session". That may be your problem if it says Private!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Monday, February 29, 2016 10:22 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks Kurt - your understanding is correct.
I have pinned down the problem to the detail form. When I call it something changes the record pointer to the first record. When the calling form gets control back the record pointer is where the detail
form left it.
I have not been able to find any reason for this but wonder if it is related to the fact that the form was first created using the form
wizard.
I had grief with changing the table alias with that form so I opened a new form and copied the complete layout. That took care of table name but perhaps there is an "unwanted feature" still in place from its former life as a wizard created form. I'd rather not do the tedious work of regenerating the form - any
ideas?
Thank you,
Joe
On Mon, Feb 29, 2016 at 9:21 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
> Fernando - that's just the opposite of what Joe wants. He > indeed wants Both forms to be looking at the same records - > such that if he brings up the 2nd form - and Changes to a > different record - then upon returning back to 1st form - > it should now be looking at the Same record that Form2 was > pointing
to!
> > Regards, > Kurt Wendt > Consultant > > > Tel. +1-212-747-9100 > www.GlobeTax.com > > > -----Original Message----- > From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On > Behalf Of Fernando D. Bozzo > Sent: Monday, February 29, 2016 1:16 AM > To: profoxtech@leafe.com > Subject: Re: How to allow multiple forms to update the same > record pointer in a table > > Hello joe: > > You may need to use private session en form 2 or on both, > so record pointers do not interfere between forms. > > > --- StripMime Report -- processed MIME parts ---
multipart/alternative
> text/plain (text body -- kept) text/html > --- >
[excessive quoting removed by server]
_______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CABQeDnXdKOoMXfvCjrj7nqDVDeQ+JmE4YdSj... ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious. Report [OT] Abuse: http://leafe.com/reportAbuse/CABQeDnXdKOoMXfvCjrj7nqDVDeQ+JmE4YdSjDK45XrY7ve...
Bingo - that was it! I had tried to figure out how to work with the data environment setting but never thought about just deleting the entire thing. I'll want to spend some time learning about how the data environment can work to my advantage rather than causing additional hair loss!
Thanks to all - Joe
On Tue, Mar 1, 2016 at 12:45 PM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Joe - I believe that's your problem - re: " data environment on each form shows only the one table."
If you open the form, right click on an Empty space on the form, then select Data Environment. At that point the graphical version of the DE comes up - and you should be able to simply select that Table (the graphical representation of that Table) - and just hit Delete. That should be all there is too it. Then - you would manually open the file in like the Init or Load of the form. I think that May solve your problem...
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, March 01, 2016 12:25 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
The data environment on each form shows only the one table in the system. Apparently this value gets created when the form is created. I have not figured out a way to delete it.
I have the simple demo created and could zip it up to send to whoever is willing to look at it but I am wondering how it would work to share the folder on Google drive with a link embedded in an Email. Does anyone have experience or an opinion about such an approach? - Joe
On Tue, Mar 1, 2016 at 9:06 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Joe - I completely agree with you - that it shouldn't be necessary.
As another WAG - do you have anything in a Data Environment on either the 1st form - or the 2nd form that is called?
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, March 01, 2016 7:48 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Darren and Rafael https://plus.google.com/u/0/114211264208955698806?prsrc=4I was thinking of passing the record number between forms but understood that it should not be necessary. I plan to build a very simple demo app from scratch. If that exercise doesn't shake out the problem I will zip it up and let you have a look.
Thanks - Joe
On Tue, Mar 1, 2016 at 2:44 AM, rcopquin@fibertel.com.ar wrote:
I may be a little late on this thread but this is how I do it: I set a form property in form1 called nRec which captures the recno() you are positioned in: thisform.nRec = recno('yourcursor') you set a new property in that form called nRec_1 When you call form2: do form2 with thisform.nRec to thisform.nRec_1
In the init event of form2: lparameters pnRec (you also set a property called nRec or whatever you like in form2, to receive the number of the record in form1) thisform.nRec = pnRec in the activate event of form2: select thecursorlocate for recno() = thisform.nRec In this way, form2 is positioned in the same record you are positioned in form1 (I assume you examine the record in a grid here)
in the afterrowcolchange event of the grid thisform.nRec = recno('thecursor')
If you were to move the recordpointer in form2, or even if you weren't, its unload event should have the following code:
return thisform.nRec Now, back to form1In its activate event do this: select yourcursorlocate for recno() = thisform.nRec_1 So now, the record pointer is in the same record that form2 is in. In your particular case you might want to add some control property to avoid error in the activate event of form1, such as: if (condition) select yourcursor locate for recno() = thisform.nRec_1 endif Needless to say that both forms should have private data sessions Hope it helps Rafael Copquin
El Martes, 1 de marzo, 2016 3:30:05, Darrenfoxdev@ozemail.com.au escribió:
Joe if you want it zip it all up and send it to me I'll have a look see for you.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 4:33 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I use a test button on the main form to set the record pointer to 25. As soon as I step into either of the Do Form lines the recno() changes back to a red 1 without the watch firing. The debugger shows that it is still in the click method of the command button that did
the call.
There must be something I as a dabbler am doing differently than experienced developers - what can it be?
I have changed everything except the data file I am trying to display and the behavior persists. Perhaps tomorrow I will use a different data file as well.
Thanks to all for the input so far!
Joe
On Mon, Feb 29, 2016 at 9:21 PM, Darren foxdev@ozemail.com.au wrote:
Put the SET STEP immediately before the do form.
Then on the toolbar click on the symbol with the arrow going into the brackets. Do that repeatedly and you'll go one line at a time. You'll get the idea.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 1:15 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks to your instructions I have done that and see that the pointer changes as soon as the "do form" line executes. I haven't figured out how to single step in the called form code. - Joe
On Mon, Feb 29, 2016 at 7:59 PM, Darren foxdev@ozemail.com.au
wrote:
One way ...
SET STEP ON in the code that calls the 2nd form.
Go into the breakpoints setup. (Little hand symbol) Add a breakpoint
- Type = "Break when expression has changed"
In the expression put in RECNO ("<ALIAS>") The go back the command window and type in RESUME.
Something like that should get you going.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 11:38 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I'm afraid I have forgotten the little I knew about setpoints and stepping in the debugger. I guess I need to read up on that. - Joe
On Mon, Feb 29, 2016 at 7:36 PM, Joe Yoder joe@wheypower.com
wrote:
Thanks for the idea Kurt but that was one of the first things I
checked.
I have now determined that any form I call from the main form will always start at record 1 even if the record pointer is at a different value just before the call. If the called form changes the record pointer the pointer value will persist after the form closes. I have added a button to simply browse the table from the main form. That action respects the value of the pointer on entry and leaves the pointer
in the proper place on exit.
There must be something about the forms I am using that causes this problem. I've been looking at the scx files and see that there is a some information about a cursor there. Is there a setting I need to change to get the behaviour I need? (I have done a test project where there is only one table and the behavior continues.)
Thanks for any ideas,
Joe
On Mon, Feb 29, 2016 at 11:31 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
> Just a WAG - but, what is your DataSession property value for > the Form? I think it should be set to "1-Default Data Session". > That may be your problem if it says Private! > > Regards, > Kurt Wendt > Consultant > > > Tel. +1-212-747-9100 > www.GlobeTax.com > > > -----Original Message----- > From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On > Behalf Of Joe Yoder > Sent: Monday, February 29, 2016 10:22 AM > To: profoxtech@leafe.com > Subject: Re: How to allow multiple forms to update the same > record pointer in a table > > Thanks Kurt - your understanding is correct. > > I have pinned down the problem to the detail form. When I > call it something changes the record pointer to the first
record.
> When the calling form gets control back the record pointer is > where the detail
form left it.
> > > I have not been able to find any reason for this but wonder > if it is related to the fact that the form was first created > using the form
wizard.
> I had grief with changing the table alias with that form so I > opened a new form and copied the complete layout. That took > care of table name but perhaps there is an "unwanted feature" > still in place from its former life as a wizard created form. > I'd rather not do the tedious work of regenerating the form - > any
ideas?
> > Thank you, > > Joe > > On Mon, Feb 29, 2016 at 9:21 AM, Kurt Wendt > Kurt_Wendt@globetax.com > wrote: > > > Fernando - that's just the opposite of what Joe wants. He > > indeed wants Both forms to be looking at the same records - > > such that if he brings up the 2nd form - and Changes to a > > different record - then upon returning back to 1st form - > > it should now be looking at the Same record that Form2 was > > pointing
to!
> > > > Regards, > > Kurt Wendt > > Consultant > > > > > > Tel. +1-212-747-9100 > > www.GlobeTax.com > > > > > > -----Original Message----- > > From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On > > Behalf Of Fernando D. Bozzo > > Sent: Monday, February 29, 2016 1:16 AM > > To: profoxtech@leafe.com > > Subject: Re: How to allow multiple forms to update the same > > record pointer in a table > > > > Hello joe: > > > > You may need to use private session en form 2 or on both, > > so record pointers do not interfere between forms. > > > > > > --- StripMime Report -- processed MIME parts ---
multipart/alternative
> > text/plain (text body -- kept) text/html > > --- > >
[excessive quoting removed by server]
OK - here's one more insight.
I discovered Visual Design via the Data Env. some years ago - and I "fell in love" with working that way.
So - if you open a New Form. Then, open the Data Env. as I mentioned. Then you Add a Table to the DE. Now you can do visual design. Simply click on a field in the Table and drag it onto your Form. Boom - a Text field And a Label are created. Now - select a Bunch of fields in the Table in the DE - and drag them onto the form and BOOM - you have a Grid!
Fun - Right???
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, March 01, 2016 1:30 PM To: profoxtech@leafe.com Cc: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Bingo - that was it! I had tried to figure out how to work with the data environment setting but never thought about just deleting the entire thing. I'll want to spend some time learning about how the data environment can work to my advantage rather than causing additional hair loss!
Thanks to all - Joe
On Tue, Mar 1, 2016 at 12:45 PM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Joe - I believe that's your problem - re: " data environment on each form shows only the one table."
If you open the form, right click on an Empty space on the form, then select Data Environment. At that point the graphical version of the DE comes up - and you should be able to simply select that Table (the graphical representation of that Table) - and just hit Delete. That should be all there is too it. Then - you would manually open the file in like the Init or Load of the form. I think that May solve your problem...
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, March 01, 2016 12:25 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
The data environment on each form shows only the one table in the system. Apparently this value gets created when the form is created. I have not figured out a way to delete it.
I have the simple demo created and could zip it up to send to whoever is willing to look at it but I am wondering how it would work to share the folder on Google drive with a link embedded in an Email. Does anyone have experience or an opinion about such an approach? - Joe
On Tue, Mar 1, 2016 at 9:06 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Joe - I completely agree with you - that it shouldn't be necessary.
As another WAG - do you have anything in a Data Environment on either the 1st form - or the 2nd form that is called?
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, March 01, 2016 7:48 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Darren and Rafael https://plus.google.com/u/0/114211264208955698806?prsrc=4I was thinking of passing the record number between forms but understood that it should not be necessary. I plan to build a very simple demo app from scratch. If that exercise doesn't shake out the problem I will zip it up and let you have a look.
Thanks - Joe
On Tue, Mar 1, 2016 at 2:44 AM, rcopquin@fibertel.com.ar wrote:
I may be a little late on this thread but this is how I do it: I set a form property in form1 called nRec which captures the recno() you are positioned in: thisform.nRec = recno('yourcursor') you set a new property in that form called nRec_1 When you call form2: do form2 with thisform.nRec to thisform.nRec_1
In the init event of form2: lparameters pnRec (you also set a property called nRec or whatever you like in form2, to receive the number of the record in form1) thisform.nRec = pnRec in the activate event of form2: select thecursorlocate for recno() = thisform.nRec In this way, form2 is positioned in the same record you are positioned in form1 (I assume you examine the record in a grid here)
in the afterrowcolchange event of the grid thisform.nRec = recno('thecursor')
If you were to move the recordpointer in form2, or even if you weren't, its unload event should have the following code:
return thisform.nRec Now, back to form1In its activate event do this: select yourcursorlocate for recno() = thisform.nRec_1 So now, the record pointer is in the same record that form2 is in. In your particular case you might want to add some control property to avoid error in the activate event of form1, such as: if (condition) select yourcursor locate for recno() = thisform.nRec_1 endif Needless to say that both forms should have private data sessions Hope it helps Rafael Copquin
El Martes, 1 de marzo, 2016 3:30:05, Darrenfoxdev@ozemail.com.au escribió:
Joe if you want it zip it all up and send it to me I'll have a look see for you.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 4:33 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I use a test button on the main form to set the record pointer to 25. As soon as I step into either of the Do Form lines the recno() changes back to a red 1 without the watch firing. The debugger shows that it is still in the click method of the command button that did
the call.
There must be something I as a dabbler am doing differently than experienced developers - what can it be?
I have changed everything except the data file I am trying to display and the behavior persists. Perhaps tomorrow I will use a different data file as well.
Thanks to all for the input so far!
Joe
On Mon, Feb 29, 2016 at 9:21 PM, Darren foxdev@ozemail.com.au wrote:
Put the SET STEP immediately before the do form.
Then on the toolbar click on the symbol with the arrow going into the brackets. Do that repeatedly and you'll go one line at a time. You'll get the idea.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 1:15 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks to your instructions I have done that and see that the pointer changes as soon as the "do form" line executes. I haven't figured out how to single step in the called form code.
- Joe
On Mon, Feb 29, 2016 at 7:59 PM, Darren foxdev@ozemail.com.au
wrote:
One way ...
SET STEP ON in the code that calls the 2nd form.
Go into the breakpoints setup. (Little hand symbol) Add a breakpoint
- Type = "Break when expression has changed"
In the expression put in RECNO ("<ALIAS>") The go back the command window and type in RESUME.
Something like that should get you going.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 11:38 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I'm afraid I have forgotten the little I knew about setpoints and stepping in the debugger. I guess I need to read up on that. - Joe
On Mon, Feb 29, 2016 at 7:36 PM, Joe Yoder joe@wheypower.com
wrote:
Thanks for the idea Kurt but that was one of the first things I
checked.
I have now determined that any form I call from the main form will always start at record 1 even if the record pointer is at a different value just before the call. If the called form changes the record pointer the pointer value will persist after the form closes. I have added a button to simply browse the table from the main form. That action respects the value of the pointer on entry and leaves the pointer
in the proper place on exit.
There must be something about the forms I am using that causes this problem. I've been looking at the scx files and see that there is a some information about a cursor there. Is there a setting I need to change to get the behaviour I need? (I have done a test project where there is only one table and the behavior continues.)
Thanks for any ideas,
Joe
On Mon, Feb 29, 2016 at 11:31 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
> Just a WAG - but, what is your DataSession property value > for the Form? I think it should be set to "1-Default Data Session". > That may be your problem if it says Private! > > Regards, > Kurt Wendt > Consultant > > > Tel. +1-212-747-9100 > www.GlobeTax.com > > > -----Original Message----- > From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On > Behalf Of Joe Yoder > Sent: Monday, February 29, 2016 10:22 AM > To: profoxtech@leafe.com > Subject: Re: How to allow multiple forms to update the same > record pointer in a table > > Thanks Kurt - your understanding is correct. > > I have pinned down the problem to the detail form. When I > call it something changes the record pointer to the first
record.
> When the calling form gets control back the record pointer > is where the detail
form left it.
> > > I have not been able to find any reason for this but wonder > if it is related to the fact that the form was first > created using the form
wizard.
> I had grief with changing the table alias with that form so > I opened a new form and copied the complete layout. That > took care of table name but perhaps there is an "unwanted feature" > still in place from its former life as a wizard created form. > I'd rather not do the tedious work of regenerating the form > - any
ideas?
> > Thank you, > > Joe > > On Mon, Feb 29, 2016 at 9:21 AM, Kurt Wendt > Kurt_Wendt@globetax.com > wrote: > > > Fernando - that's just the opposite of what Joe wants. He > > indeed wants Both forms to be looking at the same records > > - such that if he brings up the 2nd form - and Changes to > > a different record - then upon returning back to 1st form > > - it should now be looking at the Same record that Form2 > > was pointing
to!
> > > > Regards, > > Kurt Wendt > > Consultant > > > > > > Tel. +1-212-747-9100 > > www.GlobeTax.com > > > > > > -----Original Message----- > > From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On > > Behalf Of Fernando D. Bozzo > > Sent: Monday, February 29, 2016 1:16 AM > > To: profoxtech@leafe.com > > Subject: Re: How to allow multiple forms to update the > > same record pointer in a table > > > > Hello joe: > > > > You may need to use private session en form 2 or on both, > > so record pointers do not interfere between forms. > > > > > > --- StripMime Report -- processed MIME parts ---
multipart/alternative
> > text/plain (text body -- kept) text/html > > --- > >
[excessive quoting removed by server]
_______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CABQeDnX=EAP_KBuVc45t8HK=AwDfXZugjf40... ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious. Report [OT] Abuse: http://leafe.com/reportAbuse/CABQeDnX=EAP_KBuVc45t8HK=AwDfXZugjf40fwjvF5R50v...
Wow! I guess that aspect should put hair back on my head!
Do I assume correctly that after the form design is complete one can remove the data environment without causing issues?
On Tue, Mar 1, 2016 at 1:57 PM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
OK - here's one more insight.
I discovered Visual Design via the Data Env. some years ago - and I "fell in love" with working that way.
So - if you open a New Form. Then, open the Data Env. as I mentioned. Then you Add a Table to the DE. Now you can do visual design. Simply click on a field in the Table and drag it onto your Form. Boom - a Text field And a Label are created. Now - select a Bunch of fields in the Table in the DE - and drag them onto the form and BOOM - you have a Grid!
Fun - Right???
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, March 01, 2016 1:30 PM To: profoxtech@leafe.com Cc: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Bingo - that was it! I had tried to figure out how to work with the data environment setting but never thought about just deleting the entire thing. I'll want to spend some time learning about how the data environment can work to my advantage rather than causing additional hair loss!
Thanks to all - Joe
On Tue, Mar 1, 2016 at 12:45 PM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Joe - I believe that's your problem - re: " data environment on each form shows only the one table."
If you open the form, right click on an Empty space on the form, then select Data Environment. At that point the graphical version of the DE comes up - and you should be able to simply select that Table (the graphical representation of that Table) - and just hit Delete. That should be all there is too it. Then - you would manually open the file in like the Init or Load of the form. I think that May solve your
problem...
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, March 01, 2016 12:25 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
The data environment on each form shows only the one table in the system. Apparently this value gets created when the form is created. I have not figured out a way to delete it.
I have the simple demo created and could zip it up to send to whoever is willing to look at it but I am wondering how it would work to share the folder on Google drive with a link embedded in an Email. Does anyone have experience or an opinion about such an approach? - Joe
On Tue, Mar 1, 2016 at 9:06 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Joe - I completely agree with you - that it shouldn't be necessary.
As another WAG - do you have anything in a Data Environment on either the 1st form - or the 2nd form that is called?
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, March 01, 2016 7:48 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Darren and Rafael https://plus.google.com/u/0/114211264208955698806?prsrc=4I was thinking of passing the record number between forms but understood that it should not be necessary. I plan to build a very simple demo app from scratch. If that exercise doesn't shake out the problem I will zip it up and let you have a look.
Thanks - Joe
On Tue, Mar 1, 2016 at 2:44 AM, rcopquin@fibertel.com.ar wrote:
I may be a little late on this thread but this is how I do it: I set a form property in form1 called nRec which captures the recno() you are positioned in: thisform.nRec = recno('yourcursor') you set a new property in that form called nRec_1 When you call form2: do form2 with thisform.nRec to thisform.nRec_1
In the init event of form2: lparameters pnRec (you also set a property called nRec or whatever you like in form2, to receive the number of the record in form1) thisform.nRec = pnRec in the activate event of form2: select thecursorlocate for recno() = thisform.nRec In this way, form2 is positioned in the same record you are positioned in form1 (I assume you examine the record in a grid here)
in the afterrowcolchange event of the grid thisform.nRec = recno('thecursor')
If you were to move the recordpointer in form2, or even if you weren't, its unload event should have the following code:
return thisform.nRec Now, back to form1In its activate event do this: select yourcursorlocate for recno() = thisform.nRec_1 So now, the record pointer is in the same record that form2 is in. In your particular case you might want to add some control property to avoid error in the activate event of form1, such as: if (condition) select yourcursor locate for recno() = thisform.nRec_1 endif Needless to say that both forms should have private data sessions Hope it helps Rafael Copquin
El Martes, 1 de marzo, 2016 3:30:05, Darrenfoxdev@ozemail.com.au escribió:
Joe if you want it zip it all up and send it to me I'll have a look see for you.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 4:33 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I use a test button on the main form to set the record pointer to 25. As soon as I step into either of the Do Form lines the recno() changes back to a red 1 without the watch firing. The debugger shows that it is still in the click method of the command button that did
the call.
There must be something I as a dabbler am doing differently than experienced developers - what can it be?
I have changed everything except the data file I am trying to display and the behavior persists. Perhaps tomorrow I will use a different data file as well.
Thanks to all for the input so far!
Joe
On Mon, Feb 29, 2016 at 9:21 PM, Darren foxdev@ozemail.com.au
wrote:
Put the SET STEP immediately before the do form.
Then on the toolbar click on the symbol with the arrow going into the brackets. Do that repeatedly and you'll go one line at a
time.
You'll get the idea.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 1:15 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks to your instructions I have done that and see that the pointer changes as soon as the "do form" line executes. I haven't figured out how to single step in the called form code.
- Joe
On Mon, Feb 29, 2016 at 7:59 PM, Darren foxdev@ozemail.com.au
wrote:
One way ...
SET STEP ON in the code that calls the 2nd form.
Go into the breakpoints setup. (Little hand symbol) Add a breakpoint
- Type = "Break when expression has changed"
In the expression put in RECNO ("<ALIAS>") The go back the command window and type in RESUME.
Something like that should get you going.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 11:38 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I'm afraid I have forgotten the little I knew about setpoints and stepping in the debugger. I guess I need to read up on that. - Joe
On Mon, Feb 29, 2016 at 7:36 PM, Joe Yoder joe@wheypower.com
wrote:
> Thanks for the idea Kurt but that was one of the first > things I
checked.
> > I have now determined that any form I call from the main > form will always start at record 1 even if the record > pointer is at a different value just before the call. If > the called form changes the record pointer the pointer value > will persist after the form closes. I have added a button > to simply browse the table from the main form. That action > respects the value of the pointer on entry and leaves the > pointer in the proper place on exit. > > There must be something about the forms I am using that > causes this problem. I've been looking at the scx files and > see that there is a some information about a cursor there. > Is there a setting I need to change to get the behaviour I > need? (I have done a test project where there is only one > table and the behavior > continues.) > > Thanks for any ideas, > > Joe > > On Mon, Feb 29, 2016 at 11:31 AM, Kurt Wendt > Kurt_Wendt@globetax.com > wrote: > >> Just a WAG - but, what is your DataSession property value >> for the Form? I think it should be set to "1-Default Data
Session".
>> That may be your problem if it says Private! >> >> Regards, >> Kurt Wendt >> Consultant >> >> >> Tel. +1-212-747-9100 >> www.GlobeTax.com >> >> >> -----Original Message----- >> From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On >> Behalf Of Joe Yoder >> Sent: Monday, February 29, 2016 10:22 AM >> To: profoxtech@leafe.com >> Subject: Re: How to allow multiple forms to update the same >> record pointer in a table >> >> Thanks Kurt - your understanding is correct. >> >> I have pinned down the problem to the detail form. When I >> call it something changes the record pointer to the first
record.
>> When the calling form gets control back the record pointer >> is where the detail form left it. >> >> >> I have not been able to find any reason for this but wonder >> if it is related to the fact that the form was first >> created using the form wizard. >> I had grief with changing the table alias with that form so >> I opened a new form and copied the complete layout. That >> took care of table name but perhaps there is an "unwanted
feature"
>> still in place from its former life as a wizard created form. >> I'd rather not do the tedious work of regenerating the form >> - any
ideas?
>> >> Thank you, >> >> Joe >> >> On Mon, Feb 29, 2016 at 9:21 AM, Kurt Wendt >> Kurt_Wendt@globetax.com >> wrote: >> >> > Fernando - that's just the opposite of what Joe wants. He >> > indeed wants Both forms to be looking at the same records >> > - such that if he brings up the 2nd form - and Changes to >> > a different record - then upon returning back to 1st form >> > - it should now be looking at the Same record that Form2 >> > was pointing
to!
>> > >> > Regards, >> > Kurt Wendt >> > Consultant >> > >> > >> > Tel. +1-212-747-9100 >> > www.GlobeTax.com >> > >> > >> > -----Original Message----- >> > From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On >> > Behalf Of Fernando D. Bozzo >> > Sent: Monday, February 29, 2016 1:16 AM >> > To: profoxtech@leafe.com >> > Subject: Re: How to allow multiple forms to update the >> > same record pointer in a table >> > >> > Hello joe: >> > >> > You may need to use private session en form 2 or on both, >> > so record pointers do not interfere between forms. >> > >> > >> > --- StripMime Report -- processed MIME parts ---
multipart/alternative
>> > text/plain (text body -- kept) text/html >> > --- >> >
[excessive quoting removed by server]
Correct. Mostly. You don't remove the DE - you simply remove the Table from the DE - and that will do what you want. And, that is exactly the trick I use. I do it to rapidly develop a screen.
I just KNEW you would like it!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, March 01, 2016 3:12 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Wow! I guess that aspect should put hair back on my head!
Do I assume correctly that after the form design is complete one can remove the data environment without causing issues?
On Tue, Mar 1, 2016 at 1:57 PM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
OK - here's one more insight.
I discovered Visual Design via the Data Env. some years ago - and I "fell in love" with working that way.
So - if you open a New Form. Then, open the Data Env. as I mentioned. Then you Add a Table to the DE. Now you can do visual design. Simply click on a field in the Table and drag it onto your Form. Boom - a Text field And a Label are created. Now - select a Bunch of fields in the Table in the DE - and drag them onto the form and BOOM - you have a Grid!
Fun - Right???
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, March 01, 2016 1:30 PM To: profoxtech@leafe.com Cc: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Bingo - that was it! I had tried to figure out how to work with the data environment setting but never thought about just deleting the entire thing. I'll want to spend some time learning about how the data environment can work to my advantage rather than causing additional hair loss!
Thanks to all - Joe
On Tue, Mar 1, 2016 at 12:45 PM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Joe - I believe that's your problem - re: " data environment on each form shows only the one table."
If you open the form, right click on an Empty space on the form, then select Data Environment. At that point the graphical version of the DE comes up - and you should be able to simply select that Table (the graphical representation of that Table) - and just hit Delete. That should be all there is too it. Then - you would manually open the file in like the Init or Load of the form. I think that May solve your
problem...
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, March 01, 2016 12:25 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
The data environment on each form shows only the one table in the system. Apparently this value gets created when the form is created. I have not figured out a way to delete it.
I have the simple demo created and could zip it up to send to whoever is willing to look at it but I am wondering how it would work to share the folder on Google drive with a link embedded in an Email. Does anyone have experience or an opinion about such an approach? - Joe
On Tue, Mar 1, 2016 at 9:06 AM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
Joe - I completely agree with you - that it shouldn't be necessary.
As another WAG - do you have anything in a Data Environment on either the 1st form - or the 2nd form that is called?
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, March 01, 2016 7:48 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Darren and Rafael https://plus.google.com/u/0/114211264208955698806?prsrc=4I was thinking of passing the record number between forms but understood that it should not be necessary. I plan to build a very simple demo app from scratch. If that exercise doesn't shake out the problem I will zip it up and let you have a look.
Thanks - Joe
On Tue, Mar 1, 2016 at 2:44 AM, rcopquin@fibertel.com.ar wrote:
I may be a little late on this thread but this is how I do it: I set a form property in form1 called nRec which captures the recno() you are positioned in: thisform.nRec = recno('yourcursor') you set a new property in that form called nRec_1 When you call form2: do form2 with thisform.nRec to thisform.nRec_1
In the init event of form2: lparameters pnRec (you also set a property called nRec or whatever you like in form2, to receive the number of the record in form1) thisform.nRec = pnRec in the activate event of form2: select thecursorlocate for recno() = thisform.nRec In this way, form2 is positioned in the same record you are positioned in form1 (I assume you examine the record in a grid here)
in the afterrowcolchange event of the grid thisform.nRec = recno('thecursor')
If you were to move the recordpointer in form2, or even if you weren't, its unload event should have the following code:
return thisform.nRec Now, back to form1In its activate event do this: select yourcursorlocate for recno() = thisform.nRec_1 So now, the record pointer is in the same record that form2 is in. In your particular case you might want to add some control property to avoid error in the activate event of form1, such as: if (condition) select yourcursor locate for recno() = thisform.nRec_1 endif Needless to say that both forms should have private data sessions Hope it helps Rafael Copquin
El Martes, 1 de marzo, 2016 3:30:05, Darrenfoxdev@ozemail.com.au escribió:
Joe if you want it zip it all up and send it to me I'll have a look see for you.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 4:33 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I use a test button on the main form to set the record pointer to 25. As soon as I step into either of the Do Form lines the recno() changes back to a red 1 without the watch firing. The debugger shows that it is still in the click method of the command button that did
the call.
There must be something I as a dabbler am doing differently than experienced developers - what can it be?
I have changed everything except the data file I am trying to display and the behavior persists. Perhaps tomorrow I will use a different data file as well.
Thanks to all for the input so far!
Joe
On Mon, Feb 29, 2016 at 9:21 PM, Darren foxdev@ozemail.com.au
wrote:
Put the SET STEP immediately before the do form.
Then on the toolbar click on the symbol with the arrow going into the brackets. Do that repeatedly and you'll go one line at a
time.
You'll get the idea.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 1:15 PM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Thanks to your instructions I have done that and see that the pointer changes as soon as the "do form" line executes. I haven't figured out how to single step in the called form code.
- Joe
On Mon, Feb 29, 2016 at 7:59 PM, Darren foxdev@ozemail.com.au
wrote:
One way ...
SET STEP ON in the code that calls the 2nd form.
Go into the breakpoints setup. (Little hand symbol) Add a breakpoint
- Type = "Break when expression has changed"
In the expression put in RECNO ("<ALIAS>") The go back the command window and type in RESUME.
Something like that should get you going.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Tuesday, 1 March 2016 11:38 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
I'm afraid I have forgotten the little I knew about setpoints and stepping in the debugger. I guess I need to read up on that. - Joe
On Mon, Feb 29, 2016 at 7:36 PM, Joe Yoder joe@wheypower.com
wrote:
> Thanks for the idea Kurt but that was one of the first > things I
checked.
> > I have now determined that any form I call from the main > form will always start at record 1 even if the record > pointer is at a different value just before the call. If > the called form changes the record pointer the pointer > value will persist after the form closes. I have added a > button to simply browse the table from the main form. > That action respects the value of the pointer on entry and > leaves the pointer in the proper place on exit. > > There must be something about the forms I am using that > causes this problem. I've been looking at the scx files > and see that there is a some information about a cursor there. > Is there a setting I need to change to get the behaviour I > need? (I have done a test project where there is only one > table and the behavior > continues.) > > Thanks for any ideas, > > Joe > > On Mon, Feb 29, 2016 at 11:31 AM, Kurt Wendt > Kurt_Wendt@globetax.com > wrote: > >> Just a WAG - but, what is your DataSession property value >> for the Form? I think it should be set to "1-Default Data
Session".
>> That may be your problem if it says Private! >> >> Regards, >> Kurt Wendt >> Consultant >> >> >> Tel. +1-212-747-9100 >> www.GlobeTax.com >> >> >> -----Original Message----- >> From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On >> Behalf Of Joe Yoder >> Sent: Monday, February 29, 2016 10:22 AM >> To: profoxtech@leafe.com >> Subject: Re: How to allow multiple forms to update the >> same record pointer in a table >> >> Thanks Kurt - your understanding is correct. >> >> I have pinned down the problem to the detail form. When >> I call it something changes the record pointer to the >> first
record.
>> When the calling form gets control back the record >> pointer is where the detail form left it. >> >> >> I have not been able to find any reason for this but >> wonder if it is related to the fact that the form was >> first created using the form wizard. >> I had grief with changing the table alias with that form >> so I opened a new form and copied the complete layout. >> That took care of table name but perhaps there is an >> "unwanted
feature"
>> still in place from its former life as a wizard created form. >> I'd rather not do the tedious work of regenerating the >> form >> - any
ideas?
>> >> Thank you, >> >> Joe >> >> On Mon, Feb 29, 2016 at 9:21 AM, Kurt Wendt >> Kurt_Wendt@globetax.com >> wrote: >> >> > Fernando - that's just the opposite of what Joe wants. >> > He indeed wants Both forms to be looking at the same >> > records >> > - such that if he brings up the 2nd form - and Changes >> > to a different record - then upon returning back to 1st >> > form >> > - it should now be looking at the Same record that >> > Form2 was pointing
to!
>> > >> > Regards, >> > Kurt Wendt >> > Consultant >> > >> > >> > Tel. +1-212-747-9100 >> > www.GlobeTax.com >> > >> > >> > -----Original Message----- >> > From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] >> > On Behalf Of Fernando D. Bozzo >> > Sent: Monday, February 29, 2016 1:16 AM >> > To: profoxtech@leafe.com >> > Subject: Re: How to allow multiple forms to update the >> > same record pointer in a table >> > >> > Hello joe: >> > >> > You may need to use private session en form 2 or on >> > both, so record pointers do not interfere between forms. >> > >> > >> > --- StripMime Report -- processed MIME parts ---
multipart/alternative
>> > text/plain (text body -- kept) text/html >> > --- >> >
[excessive quoting removed by server]
_______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CABQeDnWyBEikmYfwGVto5CsBT=59v02Q5b7S... ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious. Report [OT] Abuse: http://leafe.com/reportAbuse/CABQeDnWyBEikmYfwGVto5CsBT=59v02Q5b7SZRcMkzK--s...
Ups, sorry then. El 29/2/2016 15:22, "Kurt Wendt" Kurt_Wendt@globetax.com escribió:
Fernando - that's just the opposite of what Joe wants. He indeed wants Both forms to be looking at the same records - such that if he brings up the 2nd form - and Changes to a different record - then upon returning back to 1st form - it should now be looking at the Same record that Form2 was pointing to!
Regards, Kurt Wendt Consultant
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Fernando D. Bozzo Sent: Monday, February 29, 2016 1:16 AM To: profoxtech@leafe.com Subject: Re: How to allow multiple forms to update the same record pointer in a table
Hello joe:
You may need to use private session en form 2 or on both, so record pointers do not interfere between forms.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]