Hot Topic (More than 10 Replies) How do you 'ThrowFocus' into a subform? (Read 1989 times)
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
How do you 'ThrowFocus' into a subform?
Feb 6th, 2005 at 8:01pm
Print Post Print Post  
Is this possible?

Is it still possible if the subform occupies the entire page on a tabpage? (Will the tabpage automatically open as it does when focus is sent to a basic LE?)

Thanks,
Steve
  
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: How do you 'ThrowFocus' into a subform?
Reply #1 - Feb 20th, 2005 at 9:02pm
Print Post Print Post  
Anyone?

Steve
  
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: How do you 'ThrowFocus' into a subform?
Reply #2 - Mar 3rd, 2005 at 1:05am
Print Post Print Post  
Still need a way to 'throwfocus' into the first field of a line-items subform.

If the subform is on a tab page, will the page automatically 'flip open'?

Thanks for the help!

Steve
  
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: How do you 'ThrowFocus' into a subform?
Reply #3 - Mar 3rd, 2005 at 1:44am
Print Post Print Post  
Steve,

As a last resort, maybe you could include @macro() in your programming to call a macro that selects the tab page, then clicks in the subform element you want to go to.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: How do you 'ThrowFocus' into a subform?
Reply #4 - Mar 3rd, 2005 at 1:47am
Print Post Print Post  
Nice! I never thought of that.

Could a macro also be called to push a command button?

I'm not too familiar with macros, but at this point I'm ready to learn them.

Thanks for your help!

Steve

  
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: How do you 'ThrowFocus' into a subform?
Reply #5 - Mar 3rd, 2005 at 2:01am
Print Post Print Post  
Quote:
Could a macro also be called to push a command button?

I don't see why not. That's the good thing about a macro - it can do almost anything you would do. The bad part is that it will do it blindly, regardless of the circumstances. In other words, you can't have it do it's thing based on "If... Then..." type criteria.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: How do you 'ThrowFocus' into a subform?
Reply #6 - Mar 3rd, 2005 at 2:05am
Print Post Print Post  
Great to hear. I made an attempt at using a macro to push a button, but it crashed Sesame each time. I guess I had some bad programming in there.

I'll give it a closer look now that you mentioned it.

Thanks again for your help! I'll post my results here when I'm done.

Steve
  
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: How do you 'ThrowFocus' into a subform?
Reply #7 - Mar 3rd, 2005 at 2:45am
Print Post Print Post  
Steve,

Just to let you know, I ran a test using @macro() in programming to "push" a command button (being another element on the same form), and it worked fine. So, you should be able to do this.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: How do you 'ThrowFocus' into a subform?
Reply #8 - Mar 3rd, 2005 at 3:04am
Print Post Print Post  
Thanks Carl. Full steam ahead then!

Smiley

Steve
  
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: How do you 'ThrowFocus' into a subform?
Reply #9 - Jan 20th, 2006 at 8:23pm
Print Post Print Post  
Steve wrote: Quote:
Thanks again for your help! I'll post my results here when I'm done.

Carl wrote: Quote:
Just to let you know, I ran a test using @macro() in programming to "push" a command button (being another element on the same form), and it worked fine. So, you should be able to do this.

I'd be interested in seeing the code that accomplished this, if you folks would be so kind.  My email is Info@jamiara.com.  Thanks!
  

**
Captain Infinity
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: How do you 'ThrowFocus' into a subform?
Reply #10 - Jan 21st, 2006 at 12:38am
Print Post Print Post  
Hey Capt'n,

The macro simply contained a single mouse-click on the command button. But, you'd probably be better off to just include whatever programming is in the button, right in the code that would be calling it via a macro.

I don't know exactly why Steve asked about using a macro to "push a command button". His original question was regarding throwing focus to a table-view subform. If you are trying to throw focus to a table-view subform, the following code is what I have been using to do that.

Code
Select All
@Macro("Data\Click on Transactions Subform.mac")
FormResultSetCurrentPosition ("Transactions", @FormResultSetTotal("Transactions"))
 


The macro contains a single mouse-click at the top of the subform, above the column that I want highlighted. (Not on the name of the LE, but in the blank space above it.) The second line causes the highlight to be in the very last row at the bottom of the subform. This makes it convenient to use the down arrow to move to a new blank row, so I can add a new line-item (or transaction, in this case).

  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Re: How do you 'ThrowFocus' into a subform?
Reply #11 - Jan 22nd, 2006 at 2:27pm
Print Post Print Post  
Hello Carl,

Navigation with Macos zwischen TabPages works only to open a TabPage but not when i enter a LE in the new TabPage!
.. und how kann i see my Macros in readable Code?

Your Suggestions are very appreciated.
  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: How do you 'ThrowFocus' into a subform?
Reply #12 - Jan 22nd, 2006 at 2:50pm
Print Post Print Post  
Quote:
Navigation with Macos zwischen TabPages works only to open a TabPage but not when i enter a LE in the new TabPage!

I don't understand your question. Can you rephrase it?

Quote:
how kann i see my Macros in readable Code?

You can't in the current version of Sesame, but there is hope. Mark has informed us that macros in version 2 will be "human readable/editable". See the second post in this thread:
http://www.lantica.com/Forum2/cgi-bin/yabb/YaBB.pl?board=gen_disc;action=display...
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Re: How do you 'ThrowFocus' into a subform?
Reply #13 - Jan 22nd, 2006 at 6:20pm
Print Post Print Post  
Hello Carl

Thank you for the feedback. Sorry Carl, now i know that my englisch is still not gut enough (my 4th language).  
Now i tray it again to let you know that i ran a  @macro() in programming to push a command button form the TabPage1. The macro muss throwfocus to TabPage2 and open a programmed ComboBox.

The macro simply contained two mouse-click on the command button but it does not do what expected.
It go somewhere else on another Tabpage or another LE!
 
can be the raison that Comboboxes on other tabPages in almost the same localisation (superposition )?

Thanks for your help!


  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: How do you 'ThrowFocus' into a subform?
Reply #14 - Jan 24th, 2006 at 12:58pm
Print Post Print Post  
Quote:
can be the raison that Comboboxes on other tabPages in almost the same localisation (superposition )?

If I understand you correctly, the macro is just clicking twice on a command button that is on TabPage1. Based on this assumption, I would answer yes to your question above.

You will need to re-record the macro to include a mouse-click on TabPage1 first, then on the command button.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged