Normal Topic Whats up with Programming in table view/subforms? (Read 721 times)
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Whats up with Programming in table view/subforms?
Mar 21st, 2004 at 5:33am
Print Post Print Post  
It appears that ALL my programming is running 2 or 3 times in the table view subform in the Invoice application from Inside Sesame March edition.

I assume this will happen in all subforms in table view. For example, On element exit program:

If stock no = "100" then writeln("100").

I get 2 writeln windows and one window has 100 written twice!!!

my best guess is becuase of these three lines that grab info from the parent form, then come back to the subform to enter and save the info.

My last LE On element exit prgramming says:

if stock no > "100" then
{
I      = @formfieldvalue("Invoice", "invoice no", 0)
D      = @Formfieldvalue("Invoice", "invoicedate", 0)
P      = @formfieldvalue("invoice", "home phone", 0)
}


I cant figure it out. Can a subform just not handle much programming? I cant even get CreateNewRecord() to start a new record. It seems to save, then goes UP a line, not DOWN!

Frustrating!

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



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Whats up with Programming in table view/subfor
Reply #1 - Mar 21st, 2004 at 5:23pm
Print Post Print Post  
Like you, I also got two WriteLN windows from programming that was place in a Subform layout. ???
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Whats up with Programming in table view/subfor
Reply #2 - Mar 21st, 2004 at 5:56pm
Print Post Print Post  
WriteLn in particular may behave strangely from a Table View Subform because of the way it pushes focus around.
  

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



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Whats up with Programming in table view/subfor
Reply #3 - Mar 21st, 2004 at 6:19pm
Print Post Print Post  
You are absolutely correct. Grin

I tried some programming that only incremented a money field by 1 each time it entered that element, and it added only 1 each pass. 8)
  


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: Whats up with Programming in table view/subfor
Reply #4 - Mar 21st, 2004 at 7:09pm
Print Post Print Post  
So can someone give us some tips on using programming in a subform? It looks as if all programming is run everytime you move from cell to cell in table view.

Is this addresses in the users manual and I overlooked it?

Thanks,
Steve in Texas
  
Back to top
IP Logged