Results 1 to 2 of 2

Thread: Data Type Help

  1. #1

    Thread Starter
    Addicted Member Tiovital's Avatar
    Join Date
    Apr 2000
    Posts
    249
    Hi,
    I have in Module
    Public Type UserRecord ' Create user-defined type.

    Data1 As String * 10
    Data2 As String * 1
    Mytest1 As integer
    My1 as boolean
    End Type


    In My Procedure:

    dim Myrec as userrec

    1) how can i address the UserRecord as ONE STRING?
    2) How can i clear UserRecord in 1 command or move data to the record as 1 field like Userrecore = text1.text or Myrec = text2.text ?

    Regards



  2. #2
    Lively Member Kersey's Avatar
    Join Date
    Jun 1999
    Location
    The Netherlands
    Posts
    101
    You could build a function which converts the textbox.text into the user type :

    function FillMyRecord (byref thisrecord as userrecord,textboxvalue as string)

    thisrecord.data1 = left$(textboxvalue,10)
    thisrecord.My1 = right$(textboxvalue,1)

    end function






Posting Permissions

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



Click Here to Expand Forum to Full Width