Switch
  Case VSDGTPDATA="1": Moveto [Data de Emissao ] TypeIn ">=~VSDGDTINI,<=~VSDGDTFIM"
  Case VSDGTPDATA="2": Moveto [Data de Entrega ] TypeIn ">=~VSDGDTINI,<=~VSDGDTFIM"
  Case VSDGTPDATA="3": Moveto [Data_Inclusao   ] TypeIn ">=~VSDGDTINI,<=~VSDGDTFIM"
EndSwitch

                    Case Campo="TG_TPDATA"          :
                                VSDGTPDATA=ControlValue("TG_TPDATA")
                                If IsBlank(VSDGTPDATA)
                                     Then VSDGTPDATA="1"
                                EndIf
                                Switch
                                  Case VSDGTPDATA="1": VSDGNOMTPDATA="EMISSAO"
                                  Case VSDGTPDATA="2": VSDGNOMTPDATA="ENTREGA"
                                  Case VSDGTPDATA="3": VSDGNOMTPDATA="INCLUSAO"
                                EndSwitch
                                Campo="TG_DTINI"

  Case Campo="TG_TPDATA":
       MSG_CAMPO="1 = EMISSAO  2 = ENTREGA  3 = INCLUSAO"
VSDGTPDATA           =""

    Label  @ 04,00 "Op‡„o de Data" For "TG_TPDATA"
    Accept @ 05,01 Width 07 "A1"  Picture "1,2,3"  Tag "TG_TPDATA"     To VSDGTPDATA
    Accept @ 05,09 Width 23 "A18" Picture "!*!"  Tag "TG_NOMTPDATA" To VSDGNOMTPDATA

