Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2003
    Location
    malaysia
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Convert String to Integer

    this is my generated random number but i want to compare with my integer data....
    everytime i compare it, i willl get the type mismatch

    dim ticketLength,x,thisInt,k
    ticketLength = 6
    dim IntArr
    IntArr = Array(1,2,3,4,5,6,7,8,9,0)
    For x = 0 to ticketLength
    RANDOMIZE
    thisInt = (Int(((10 - 1) * Rnd) + 1))
    totalInt = totalInt & IntArr(thisInt)
    next
    k = rsTicket.Fields("Ticket_no").value
    if k = int(totalInt) then
    .......

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    See if this does the trick

    hm = int(String)

    Eric


  •  

    Posting Permissions

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