Results 1 to 6 of 6

Thread: Invalid Procedure or Call error

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Location
    Leicester, England (City of Kings)
    Posts
    156

    Invalid Procedure or Call error

    Hello

    I've set up an address book in VB. It has a control array of command buttons labeled a-z, that move the recordset to the first surname beginning with the letter on the button. This enables people to move quickly through thousands of addresses.

    This was working well, Until I had to add clients with no surnames (businesses, for example). However, when this happens, I get an Invalid procedure or call arguement.

    My code is below.

    Can anyone suggest a quick fix?

    VB Code:
    1. Private Sub Command1_Click(Index As Integer)
    2.  
    3. rec3ClientDetails.MoveFirst
    4.  
    5. Do Until Asc(Left(rec3ClientDetails("Surname"), 1)) = Index + 65
    6.    If Asc(Left(rec3ClientDetails("Surname"), 1)) > Index + 65 Then Stop
    7.      
    8.      rec3ClientDetails.MoveNext
    9.      
    10. Loop

    Thanks

    Sam
    Last edited by Samibouni; Dec 3rd, 2002 at 12:31 AM.

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