Cross Function/Global Variables??

Results 1 to 2 of 2

Thread: Cross Function/Global Variables??

  1. #1
    Join Date
    Dec 1969

    Default Cross Function/Global Variables??

    I&#039;ve put together the function below and I&#039;m having trouble with one variable. I&#039;d like the variable errorMsgStr to carryover from function to function so that it would eventually look like this.<BR><BR>errorMsgStr = ",Hull Material must be numberic,Length is required,etc"<BR><BR>How can I make a global variable?<BR><BR>Here&#039;s the function:<BR><BR>function chkDropDown(name,field,req)<BR>fieldValue = request(field)<BR>if req = "y" then<BR> &#039;check to see if a value was specified for the field<BR> if fieldValue &#060;&#062; "" then<BR> &#039;make sure the datatype is numeric<BR> if isnumeric(fieldValue) &#060;&#062; true then<BR> errorMsgStr = errorMsgStr & "," & name & " must be numeric"<BR> end if<BR> else<BR> errorMsgStr = errorMsgStr & "," & name & " cannot be left blank"<BR> end if<BR>end if<BR>end function<BR><BR>Thanks in advance.<BR>Andy

  2. #2
    Join Date
    Dec 1969

    Default Put it outside the functions..

    ..<BR><BR>Just put it outside all the functions... If you dim it outside the functions, it is global to that page.<BR><BR>-- Whol

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts