Normal Topic Command button programming issues (Read 1186 times)
Blightman
Member
*
Offline


No personal text

Posts: 17
Location: D.C. person living in Utah
Joined: May 12th, 2004
Command button programming issues
May 12th, 2004 at 7:50pm
Print Post Print Post  
I am having a bit of trouble programming a command button on Sesame. I want the command button to search for information in the database that I have created based off specific date ranges, and the post the information in a specific report.

I know that the code needs to start with "On element entry" and something to do with the "Global Value" code. Then, I think that there needs to be some coding with "On retrieve spec open event," and "on form entry" with the "select tree item." I'm not sure, though, how to get the coding right. Sesame's programming manual doesn't give me the whole story--either that, or I'm missing something. Any thoughts?   Angry
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Command button programming issues
Reply #1 - May 12th, 2004 at 7:54pm
Print Post Print Post  
The requirements are a bit vague for us write you any specific code  Wink

There is an article in this month's issue of Inside Sesame on using Retrieve Spec programming, which includes a couple of examples that may fit your requirements. Have you seen this article?

If you don't attach a retrieve spec to your report, it will use whatever records you have retrieved, if that helps.
  

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


No personal text

Posts: 17
Location: D.C. person living in Utah
Joined: May 12th, 2004
Re: Command button programming issues
Reply #2 - May 12th, 2004 at 8:30pm
Print Post Print Post  
Let me clairfy things a bit:

I want to program a command button, using the date range that I specify in two fields on a database form, to search the database, retrieve the records between the specified date range, and then put the results retrieved into a report form.  Does that help?
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Command button programming issues
Reply #3 - May 12th, 2004 at 8:32pm
Print Post Print Post  
The Inside Sesame article does soemthing very similar using a State value. Have you seen that article?
  

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


No personal text

Posts: 17
Location: D.C. person living in Utah
Joined: May 12th, 2004
Re: Command button programming issues
Reply #4 - May 13th, 2004 at 12:04pm
Print Post Print Post  
No, I haven't seen the article to which you refer.  What is the title of it?
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Command button programming issues
Reply #5 - May 13th, 2004 at 12:19pm
Print Post Print Post  
Quote:
No, I haven't seen the article to which you refer.  What is the title of it?


It's called "Programming The Retrieve Spec". In the May 2004 issue.
  

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


No personal text

Posts: 17
Location: D.C. person living in Utah
Joined: May 12th, 2004
Re: Command button programming issues
Reply #6 - May 18th, 2004 at 8:17pm
Print Post Print Post  
Should I be bold and daring in assuming that the article to which you refer is at
http://www.lantica.com/Support/sesame_library.html
and the title of the article is "Programmed Retrieves," or any I missing something here?
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Command button programming issues
Reply #7 - May 18th, 2004 at 8:31pm
Print Post Print Post  
Quote:
Should I be bold and daring in assuming that the article to which you refer is at
http://www.lantica.com/Support/sesame_library.html
and the title of the article is "Programmed Retrieves," or any I missing something here?


No. This is a new article that I just wrote for Inside Sesame. It appears in the May 2004 issue.
  

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


No personal text

Posts: 17
Location: D.C. person living in Utah
Joined: May 12th, 2004
Re: Command button programming issues
Reply #8 - May 19th, 2004 at 4:23pm
Print Post Print Post  
Hammer,

I have read your wonderful article in the current Inside Sesame newsletter.  I used your guidelines for "Pick Date Range:Shockedn Element Entry" for a new command button that I made, and when I tested the coding for errors, none were found. 

I still needed to program the @PopUpMenu to get the date ranges ("past 7 days," etc.) to work with the command button.  I wrote:

If @Add Then Pick date range[the command button label]=

@PopUpMenu("Past 7 days;Past 14 days;Past 30 days;Past 60 days;Past 90 days", "Select a date range")

as the first three lines of the Pick date range:Shockedn Element Entry programming.  When I tested it for errors, the parsing module gave me an error:

Statement or End of File expected
var vRange as String (the first line of the coding I borrowed from your article).  How is that possible? ???

  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Command button programming issues
Reply #9 - May 19th, 2004 at 4:28pm
Print Post Print Post  
You can't assign a value to a command button. You need to follow the steps in the article more closely. You'll notice that the selected value from the Popup is assigned to a variable, then the variable value is used to create a date range retrieve, which is then assigned to the correct date element.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged