Normal Topic Calendar Issue (Read 682 times)
NICEBERG
Full Member
Members
***
Offline


I came, I saw, I'm still
trying to figure it out!

Posts: 208
Location: Green Bay, WI
Joined: Dec 17th, 2003
Calendar Issue
Mar 18th, 2006 at 4:00pm
Print Post Print Post  
I have an element named Date Closed on a form. I can access the calendar as desired (on field entry) in add mode with @Isnew, etc. No problems.

When I retrieve all records that have nothing in the Date Closed element the calendar will pop up (the = sign is the last item entered before F10 is pressed since my cursor is in Date Closed element upon retrieval).

Is there a way to retrieve the records without having the calendar pop up until it is actually needed (F10 through all open records without having the calendar pop up for each record until I click back on the Date Closed element)?

I know I can simply move the cursor to another element, but I'm designing this for others to use.

I've tried programming in the On Element Entry, On Element Immediate Change and On Retrieve Spec Open. Nothing seems to get me what I want to achieve.

Thanks in advance for any input.
Fred

Since I posted this I've added a ThrowFocus that takes me out of the element, so the calendar only comes up for the first record which can be ESCaped out of. This isn't bad, but am hoping for a better solution if there is one.
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Calendar Issue
Reply #1 - Mar 18th, 2006 at 8:55pm
Print Post Print Post  
Quote:
I can access the calendar as desired (on field entry) in add mode with @Isnew

If you already have @IsNew as a conditional, the calendar shouldn't be triggered in update mode on existing records.

Can you post the code here? Maybe you overlooked something.
  


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


I came, I saw, I'm still
trying to figure it out!

Posts: 208
Location: Green Bay, WI
Joined: Dec 17th, 2003
Re: Calendar Issue
Reply #2 - Mar 18th, 2006 at 10:23pm
Print Post Print Post  
The calendar isn't triggered with the @IsNew in the update mode.  I had to add a statement that would allow me to trigger it in the update mode.  I wound up with the following: On Element Entry

If @IsNew then Closed = @Calendar("", "Select date you closed the Order")
If @update and Closed = "" then Closed = @Calendar("", "Select date you closed the Order")
goto Notes

I was hoping to be able to retrieve the records with a blank Closed element but only trigger the calendar when I click on the element. Again, the last item entered in the retrieval spec would be an = sign in the Closed element, so the focus is there when the retrieval is made, and so the programming is executed and the calendar comes up.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Calendar Issue
Reply #3 - Mar 18th, 2006 at 10:59pm
Print Post Print Post  
In Global Code:
Code
Select All
stat my_flag as int

my_flag = 0
 



In the Form's On Form Entry:
Code
Select All
my_flag = 1
 



In the Form's On Element Entry:
Code
Select All
my_flag = 0
 



In the Element's on Element Entry:
Code
Select All
var aa as string

if(my_flag <> 1)
{
	aa = @Calendar(@Date, "Title")
}
 

  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Calendar Issue
Reply #4 - Mar 19th, 2006 at 1:55am
Print Post Print Post  
You could also use a tiny command button located beside the Closed LE, which has a small down arrow as the label. You do this by setting the label to something like "@-12>" (without the quotes, of course). This would look very similar to the one for a combo box.

You would then move your 2nd line of code into that command button event. That way you can click on the down arrow when you want to place a date in the Closed LE.
  


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


I came, I saw, I'm still
trying to figure it out!

Posts: 208
Location: Green Bay, WI
Joined: Dec 17th, 2003
Re: Calendar Issue
Reply #5 - Mar 19th, 2006 at 2:10pm
Print Post Print Post  
Thank you, gentlemen! Works great now. Cheesy
  
Back to top
 
IP Logged