Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 07 DEC 1998 06:13:46PM Paxton Scott wrote:

I've got a bunch of date fields - edit line controls.

Rather than use a default, I'd like the user to type something. Thought it would be nice to type T for today. Put the following on the CHANGED event:

declare function set_property

IF newdata=T' THEN

TODAY=set_property(CtrlEntid, "TEXT", OCONV(DATE(), 'D') )

END

Worked great! So, did it to another edit control…no work???

in another form, put it on 3 controls, one worked???

CAn't see any difference. Tried to trap with a MSG, and it appears as if the event is not executing. Another symptom is a beep as each character is entered on the non working controls. can enter part of a date say 12/3 and tab or enter, and 3 DEC 1998 comes up just fine on all of the controls.

Any ideas??? Thanks! arcs@wws.net

ARCS, Inc. [img]http://www.wws.net/arcs/arcslogo.gif[/img] </QUOTE> ---- === At 08 DEC 1998 09:39AM cpates@sprezzatura.com,[url=http://www.sprezzatura.com]Sprezzatura Ltd wrote: ===

Paxton,

If you look at the system monitor is it reporting any errors when you get the beep?

cpates@sprezzatura.com

Sprezzatura Ltd

World Leaders in all things RevSoft


=== At 08 DEC 1998 10:32AM Oystein Reigem wrote: ===

Paxton,

I've had cases where I needed to do stuff while the user typed, and sometimes I had problems with either CHANGED or CHAR. My memory fails me as to which of them. But perhaps you could try the CHAR event and see if you have more luck than with CHANGED?

- Oystein -


=== At 10 DEC 1998 12:56PM dsig@teleport.com wrote: ===

Scott,

Here is a bit of code that I use in date fields (this is the 'char' event.)

If the user enteres 'd' or 'D' it places the date .. if the user does '+' or '-' then the date increments/decrements.

Haven't had any problem with this in any field/screen i use.

dsig@teleport.com

David Tod Sigafoos ~ SigSolutions

dsig@teleport.com voice: 503-639-8080

ParentId=Get_Property(CtrlEntId,"PARENT")

Begin Case

Case BaseCtrl=ACT_DATE" OR BaseCtrl=FU_DATE"

VirtCode=Passedparam

If VirtCode=+" or VirtCode=-" Then

CurVal=Get_Property(CtrlEntId,"TEXT")
Convert "+-" to "" in CurVal
CurDate=Iconv(CurVal,"D")
If CurDate=" Then CurDate=Date() -1
Begin Case
Case VirtCode=+" 
NewDate=CurDate + 1
Case VirtCode=-"
NewDate=CurDate - 1
End Case
NewVal=Oconv(NewDate,"D2/")
x=Set_Property(CtrlEntId,"TEXT",NewVal)
End Else
  If VirtCode=D" or VirtCode=d" Then
    Set_Property(CtrlEntId,DefProp$,Oconv(Date(),"D2-")
  End
End

End Case

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/b1c865abad344a8a852566d3007f9a81.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1