Normal Topic Open DB in Search Mode (Read 1597 times)
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Open DB in Search Mode
Dec 29th, 2008 at 7:19pm
Print Post Print Post  
I'm afraid that sometimes the obvious escapes me.  I have done this dozens of times but for the life of me, I can't remember (or figure our how) to do it in a new database I created.  I simply want the db to open in search mode on my main form.  

Thanks!

  

- 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: Open DB in Search Mode
Reply #1 - Dec 29th, 2008 at 8:08pm
Print Post Print Post  
SpencerWulwick wrote on Dec 29th, 2008 at 7:19pm:
I'm afraid that sometimes the obvious escapes me.  I have done this dozens of times but for the life of me, I can't remember (or figure our how) to do it in a new database I created.  I simply want the db to open in search mode on my main form.  

Thanks!



Which version of Sesame? Manually or in SBasic?
  

- 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: Open DB in Search Mode
Reply #2 - Dec 29th, 2008 at 8:26pm
Print Post Print Post  
Version 2.1

Didn't realize there were 2 different ways - since I can't even recall 1 of them.  That just makes me feel worse.  lol

I suppose I might as well know both ways.  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: Open DB in Search Mode
Reply #3 - Dec 29th, 2008 at 8:34pm
Print Post Print Post  
SpencerWulwick wrote on Dec 29th, 2008 at 8:26pm:
Version 2.1

Didn't realize there were 2 different ways - since I can't even recall 1 of them.  That just makes me feel worse.  lol

I suppose I might as well know both ways.  Smiley


Sorry...I'm not trying to make you feel stupid. I'm asking if you are doing this just by clicking things on the screen or if you are trying to write a program (like you might put on a command button) to do this automatically.

In 2.1, if you are using the new Button Menus, just click the button with the name of your Form. It will open to the Retrieve Spec for that form.
  

- 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: Open DB in Search Mode
Reply #4 - Dec 29th, 2008 at 8:44pm
Print Post Print Post  
Don't want a command button.

When I open my new databade, I then have to click on the database name to have it open in retrieve spec mode.

In all my other databases, it automatically opens in retrieve spec; just don't remember how I did it.  Would imagine it's something very easy.
  

- 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: Open DB in Search Mode
Reply #5 - Dec 29th, 2008 at 10:12pm
Print Post Print Post  
If it happens automagically, then you must have some SBasic code in there. Open one of the databases where this happens automatically in SDesigner and look for code in the On Application Open event. This is available from the Design Menu.

Choose Application / Application Property Manager.
Click the Program Application button.

See if there is any code in there.
  

- 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: Open DB in Search Mode
Reply #6 - Dec 30th, 2008 at 3:56am
Print Post Print Post  
OK - I put the following code in the Program Application, Application Element, On Application Open ... and cannot get it to work.  

Code
Select All
var success as Int
success = @SelectTreeItem("Political Action!Forms!Search/Update!Main!PolitcalAction")
 



I am confused about the "direct path" but tried all variations I could think of.  I "patterned" it after other applications that do work.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
tcgeo
Full Member
***
Offline



Posts: 278
Location: Traverse City, Michigan
Joined: May 13th, 2008
Re: Open DB in Search Mode
Reply #7 - Dec 30th, 2008 at 2:26pm
Print Post Print Post  
Spencer, please forgive me if I have interpreted your question incorrectly.  Are you wanting to bypass the first menu that comes up on 2.1 that shows the databases available to your app and then you have to select a database to open it into search mode?

If that’s the case place this code into Application Property Manager:

var vTree as Int

vTree = @SelectTreeItem(@Application + "!Forms!Search/Update!Database Name!Form name")

This bypasses that first menu and opens the named database in search mode.

Hope this helps,

Brandon
  
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Open DB in Search Mode
Reply #8 - Dec 30th, 2008 at 4:59pm
Print Post Print Post  
Brandon -

Not only is there nothing to forgive you for; on the contrary, I want to thank you very much for your help.

Here is the code I wound up with:

Code
Select All
var vTree as Int

vTree = @SelectTreeItem(@Application+ "!Forms!Search/Update!Main!PoliticalAction")  



and, I am happy to say, it works like a charm!

I have not used @Application before, and that is a very big help.  It replaces one of the "variable" segments of the code and is one less thing that needs to be changed when copying and pasting.

I still get confused about "database name" and "form name" because it just doesn't seem to fit with what I used, but I got it to work and that is the main thing.  

Thank you, so very much, for your assistance.  I truly appreciate it.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
tcgeo
Full Member
***
Offline



Posts: 278
Location: Traverse City, Michigan
Joined: May 13th, 2008
Re: Open DB in Search Mode
Reply #9 - Dec 31st, 2008 at 1:02am
Print Post Print Post  
I’m glad I was able to help. But actually we need to, once again, thank Erika for this, as I had the same question a few weeks ago and she had the solution.

I understand the database and form name confusion.  This is what I do to get reoriented; go to the Property Viewer Panel in designer, click the “View settings for:” down arrow and select database, this will give the database name that you are in. When you Select layout, this will give the form name.

Once again, glad you got it working.

Happy New Year

Brandon

P.S.  I wish I was in Tampa. I have 3 & 1/2 feet of snow on the ground here in NW Michigan with 6”-10” more coming tonight!  
  
Back to top
IP Logged