Normal Topic FormRunProgram() help needed (Read 1188 times)
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
FormRunProgram() help needed
Aug 20th, 2007 at 6:49pm
Print Post Print Post  
First,
Is FormRunprogram() not allowed to run code that is on a command button element?

If I place identical code in on element entry of a command button element and on element entry of a text element then use FormRunProgram() I get different results.

If I run this using Test  (test is a command button element) nothing happens
FormRunProgram("orders", "test", PROGRAM_EVENT_LE_enter)

If I run this using OrderNum (OrderNum is a text element) things run
FormRunProgram("orders", "OrderNum", PROGRAM_EVENT_LE_enter)


Second

When I run FormRunProgram() from a subform using an element on the parent form for the code all works perfect. But when I run FormRunProgram() from the parent form calling element code from a subform I have focus issues.

I will try to explain what I am doing and what is happening.


I have a parent form called patients. This form has all the patient demographics.
It has a subform called orders. The subform is a form view subform that lets me see all the orders 1 by 1 of the naturally linked parent. This orders subform has a table view subform of line  items. I have an element that on form entry counts and displays the total amount of orders for that patient and the user has <previous and next> buttons that let them move through each order for that particular patient. I then have a command button that turns the orders database into a table view so you can see the totals for all orders in a simple to read spreadsheet.

The problem was I needed a simple method to turn the subform  table view back into form view without the user pressing shift f6. At first I used the

AddCommandToMenubar("Formview", "", "GlobalValue(" + @chr(34) + "test" + @Chr(34) + ", @SelectTreeItem(" + @Chr(34) + "Search Update Menu!Other Commands!Toggle Table View (Shift-F6)" + @Chr(34) + "))")

Method to change it back, but felt that was confusing to the user having to go up to the top menu bar to effect the subform (it also needed to be pressed more then once) so I decided to put a button on the parent form on top of my subform element that uses FormRunProgram() to toggle it back to formview. The problem is it successfully gets the code that toggles tableview from the subform element but since focus moves to the button on the parent form it toggles the parent form to tableview instead of toggling the subform back to form view. I tried to control focus by using FormThrowFocus("OrdersSubform", "orderNum") but it had no effect.

Is this somewhat clear? Any thoughts?

Thanks



  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: FormRunProgram() help needed
Reply #1 - Aug 20th, 2007 at 7:50pm
Print Post Print Post  
Hi Robert,

There's a lot going on here, so it may take us a little time to parse what you're after and make a test case or two. Especially with Ray out of the office for a couple of days (he escaped!). Is this urgent, or can we take a look at it later in the week?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: FormRunProgram() help needed
Reply #2 - Aug 20th, 2007 at 7:58pm
Print Post Print Post  
Nothing urgent  Smiley

It is just an icing on a great tasting cake feature. (ok the pinstriping on a great paint job)

When Ray comes back from the Frank Zappa festival and time permits If he needs, I  will send him the application so he can see what I am talking about.

Thanks and have a great Day!
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: FormRunProgram() help needed
Reply #3 - Aug 22nd, 2007 at 9:52pm
Print Post Print Post  
Robert,

No Zappa. But yeah send in the app and I'll have a look at it as soon as I can. No idea what's waiting for me when I return to the office but I will have a look at it for you.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: FormRunProgram() help needed
Reply #4 - Aug 22nd, 2007 at 10:08pm
Print Post Print Post  
Ray - welcome HOME. Hope you had a great time away, but glad you came back!


Quote:
Robert,

No Zappa. -Ray


Hey, we are all friends around here, you don’t need to worry that any of us will judge you for going to a Zappa convention. (Dressing like Moon-unit was a little scary though)


Quote:
Robert,

yeah send in the app and I'll have a look at it as soon as I can. No idea what's waiting for me when I return to the office but I will have a look at it for you.

-Ray


Thanks Ray, I will send the application your way.
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: FormRunProgram() help needed
Reply #5 - Aug 23rd, 2007 at 1:34pm
Print Post Print Post  
BOBSCOTT wrote on Aug 22nd, 2007 at 10:08pm:
Hey, we are all friends around here, you don’t need to worry that any of us will judge you for going to a Zappa convention. (Dressing like Moon-unit was a little scary though)


Robert, Robert, Robert.....

I don't worry about being judged, It's just that Zappa... well he just can't really compete with the vacation that I had. Wink

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: FormRunProgram() help needed
Reply #6 - Aug 23rd, 2007 at 2:47pm
Print Post Print Post  
Quote:
he just can't really compete with the vacation that I had. Wink

-Ray


Oh no, Please do not tell me you are going to show up on you tube with that Donkey Shocked

  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: FormRunProgram() help needed
Reply #7 - Aug 23rd, 2007 at 3:00pm
Print Post Print Post  
No videos and no donkey. You people out in Cali are odd, you know that don't ya?

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged