Normal Topic if @add programming in subforms (Read 737 times)
Boneyard_Scrounger
Junior Member
**
Offline


Canadian Government =
Elected Dictatorship

Posts: 88
Location: Peoples Republic of Kanada
Joined: Apr 20th, 2005
if @add programming in subforms
Jun 22nd, 2005 at 2:09pm
Print Post Print Post  
If we open 'lotowner' in search and update mode, and want to add a new 'flowersheet' (subform) the 'search number' (called "search")LE that contains the 'if@add' statement won't complete.
How do I get around that?

if @add and SEARCH=""then SEARCH=@number
is the full statement

I can't change it to @update, as I don't want a number change every time we look at it.
« Last Edit: Jun 22nd, 2005 at 5:33pm by Boneyard_Scrounger »  
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: if @add programming in subforms
Reply #1 - Jun 23rd, 2005 at 2:43am
Print Post Print Post  
Quote:
if @add and SEARCH=""then SEARCH=@number
is the full statement

I can't change it to @update, as I don't want a number change every time we look at it.

No matter what mode it's in, it won't change the contents of SEARCH if it already has a number in it, since you have the SEARCH="" argument in there. So you could probably remove @add from that statement.

You actually should be using (Not @IsBlank(SEARCH) ) rather than SEARCH="", assuming that SEARCH is a layout element and not a variable. You should also use the parentheses just in case you later add another criteria after this one.
  


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


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: if @add programming in subforms
Reply #2 - Jun 23rd, 2005 at 4:10am
Print Post Print Post  
Also make sure that the programming is in the subform, triggered with Form Entry event.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Boneyard_Scrounger
Junior Member
**
Offline


Canadian Government =
Elected Dictatorship

Posts: 88
Location: Peoples Republic of Kanada
Joined: Apr 20th, 2005
Re: if @add programming in subforms
Reply #3 - Jun 23rd, 2005 at 3:55pm
Print Post Print Post  
Sometimes, you just need to talk to you guys to see things clearly. I should have seen that a long time ago.
I'll change it to
if SEARCH=""then SEARCH=@number
  
Back to top
IP Logged