Hot Topic (More than 10 Replies) @mode() On Form Entry (Read 1441 times)
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
@mode() On Form Entry
Jan 27th, 2006 at 7:47pm
Print Post Print Post  
Hi -

I am using the following code in the on-form-entry event.

Code
Select All
var Vcheckmode as Int
vcheckmode=@mode()

If vcheckmode = "2" then @msgbox("Press F-10 to retrieve all existing records","","You will then find helpful informaion on each Tab Page") 



I have also tried it without any quotes around the 2.  I do not get a compile error with or without the quotes; however in neither case am I getting any message.

Help, please!

BTW, I have changed the programming to:

Code
Select All
var vCheckMode as Int
vCheckMode=@mode()

	If vCheckMode = "2"

	{	@msgbox("Press F-10 to retrieve all existing records","","You will then find helpful informaion on each Tab Page")
	}
 



Notice the "style" change after Erika's training.   Smiley
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @mode() On Form Entry
Reply #1 - Jan 27th, 2006 at 7:52pm
Print Post Print Post  
Spencer,

Mode 2 means you are on the Retrieve Spec. On Form Entry does not run on the Retrieve Spec. You would need to use the On Retrieve Spec Open event for this, rather than On Form Entry.
  

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



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: @mode() On Form Entry
Reply #2 - Jan 27th, 2006 at 8:22pm
Print Post Print Post  
Erika -

I keep forgetting about certain programming and/or events not working on the retrieve spec.  Thanks!

I started with this (on retrieve spec open):

Code
Select All
      @msgbox("Press F-10 to retrieve all existing records","","You will then find helpful informaion on each Tab Page")

/*
var vCheckMode as Int
vCheckMode=@mode()

      If vCheckMode = "2"

      {      @msgbox("Press F-10 to retrieve all existing records","","You will then find helpful informaion on each Tab Page")
      }
*/
 



Notice that I saved my original programming by remming out the entire block of code.   Smiley

and then, after testing, wound up with this:

Code
Select All
      @msgbox("Press F-10 to retrieve all existing records","","You will then find helpful informaion on each Tab Page")
 



Aren't you proud of me for already using my newly acquired "wisdom?"

More importantly, aren't you proud of yourself for training us so well?!!! I'm proud of you and still elated that we finally got to meet in person.  I soitenly (New York for "certainly" lol) hope it happens again!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @mode() On Form Entry
Reply #3 - Jan 27th, 2006 at 8:33pm
Print Post Print Post  
Bravo!!!   Grin
  

- Hammer
The plural of anecdote is not data.
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: @mode() On Form Entry
Reply #4 - Jan 27th, 2006 at 8:40pm
Print Post Print Post  
Quote:
after testing, wound up with this:
Code
Select All
@msgbox("Press F-10 to retrieve all existing records","","You will then find helpful informaion on each Tab Page") 



I have made the change on the demo you sent me and it works well.

One thing I noticed...the message box pops up before the form displays.  Is this unusual, or by design?  Is there a way to make it display after the form has loaded?

Again, as usual, I'm just curious.
  

**
Captain Infinity
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: @mode() On Form Entry
Reply #5 - Jan 27th, 2006 at 9:03pm
Print Post Print Post  
Quote:
One thing I noticed...the message box pops up before the form displays.  Is this unusual, or by design?


By design. The Code runs before the form is displayed so that you can change the form design, (hide elements, change labels, etc.)

Quote:
Is there a way to make it display after the form has loaded?


Not that I am aware of. What you may want to do is just have a piece of static Text at the top of the form that says the same thing your @MsgBox says. This way the user will see it when the form opens and does not have to click anything to make the message go away. You can hide it and show it by using the Visibility() command in the appropriate spots.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
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: @mode() On Form Entry
Reply #6 - Jan 27th, 2006 at 9:54pm
Print Post Print Post  
How about loading the code into ONEntry for the first element on the form?

Then, the normal code is run, the form is disaplayed, focus moves to first element, and the MsgBox should come up then.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
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: @mode() On Form Entry
Reply #7 - Jan 27th, 2006 at 10:11pm
Print Post Print Post  
Quote:
How about loading the code into ONEntry for the first element on the form?

Then, the normal code is run, the form is disaplayed, focus moves to first element, and the MsgBox should come up then.


Hello Bob,

On Entry event of the first element is also going to run before the user sees the form. It is also not going to run in the retrieve spec which is where I believe Scott and Spencer are talking about displaying the Message box.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
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: @mode() On Form Entry
Reply #8 - Jan 27th, 2006 at 10:29pm
Print Post Print Post  
Thanks for explaining that Ray.  It was worth a try.


But I agree with your suggestion to use Static Text and change Visibility to 0 when not wanted.
  



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



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: @mode() On Form Entry
Reply #9 - Jan 28th, 2006 at 12:03am
Print Post Print Post  
Ray (and Bob, et. al.) -

For the time being I took the "easy" way out and am just using the programming for a msgbox in on-retrieve-spec open.  BUT, I will probably switch to static text for an even better reason (other than the user not having to click to make the message box go away).

I just wanted to cover the situation when the user is first using the database - might click on a tab in search mode - and wonder why they aren't seeing anything. Once they know where/how to see the notes, then more likley than not, they don't need to be told again.

Soooo, I can give them either an askuser box (or something similar) and once they respond to "get rid of that message" I can then change it to invisible (based on their input) and then simply leave it that way.

Kinda like those "reminder" messages that come up in many situations and give you the option of "Don't show me this again" or "Continue to show it."

Thanks for the input.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: @mode() On Form Entry
Reply #10 - Jan 28th, 2006 at 6:04am
Print Post Print Post  
Hi,

Once again, I am completely OVERWHELMED by the capabilities of Sesame.  

Using Ray's suggestion of a static field and visibility(), I have exactly what I want, when and where I want it and "yes" with no click required by the user.  And all it took were two simple pieces of code:  one to turn visibility on in on-retrieve-spec-open and one to turn visibility off in on-form-entry.  

When someone is in search mode and clicks on the "Read First" tab, they get a message that says uhh uhh you can't see it here but you can see it in add or update mode (phrased differently, of course).

And, when they are in either add or update mode, they see the full text instead of the "silly" message.

This "thing" called Sesame is truly PHENOMENAL and we simply MUST get more people using and enjoying it.  They just  don't know what they are missing.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
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: @mode() On Form Entry
Reply #11 - Jan 30th, 2006 at 5:33pm
Print Post Print Post  
Quote:
Re: @mode() On Form Entry
« Reply #10 on: Jan 28th, 2006, 1:04am »


1:00 AM?  On a Saturday?  Don't you ever sleep?  Or at least party?  Wink

Quote:
Using Ray's suggestion of a static field and visibility(), I have exactly what I want, when and where I want it and "yes" with no click required by the user.  And all it took were two simple pieces of code:  one to turn visibility on in on-retrieve-spec-open and one to turn visibility off in on-form-entry.


Sounds great; I'd like to see this update.

Now get to bed or you'll be late for work in the morning!
  

**
Captain Infinity
Back to top
IP Logged