Results 1 to 3 of 3

Thread: Excel Search Form Problem

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2007
    Posts
    26

    Question Excel Search Form Problem

    Here´s what i´ve been working on.

    I can't make search page to work.

    Any help appreciated..

    Leo
    Attached Files Attached Files

  2. #2
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068

    Re: Excel Search Form Problem

    Hmph, I would be able to help except your example has no English in it.

    Why don't you describe the problem you're having in detail.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2007
    Posts
    26

    Re: Excel Search Form Problem

    Hi Spajeoly thanks for your reply.....English has nothing to do in here i guess, spanish used only for controls caption text!!! Code is written in english.

    But Here's my question......

    This is my code to search for a record in a worksheet named "Data" through a Userform named "SearchFrm", id inputted on idtxtbox(Data stored on column A), and rest of the columns(From B to N), displayed on the remaining texboxes in the form.

    Code:
    Private Sub SearchButton_Click()
    Dim r As Range, myCtl, i As Integer
    If IdTxt.Value = "" Then MsgBox "Entre un Número de Cédula a Buscar": Exit Sub
    Set r = Sheets("Data").Columns("a").Find(IdTxt.Value, , , xlWhole)
    If r Is Nothing Then MsgBox "Cédula de Identidad Inexistente": Exit Sub
    myCtl = Array("nametxt", "lastnametxt", "covtxt", "qtycovtxt", "boottxt", _
                          "qtyboottxt", "hhattxt", "glassestxt", "vesttxt", "rigseltxt", _
                           "datetxt", "clsdatetxt")
                          ' You missed the textbox for "Rig", col.K
    For i = 0 To UBound(myCtl)
         Me.Controls(myCtl(i)).Value = r.Offset(, i + 1).Text
    Next
    End Sub
    What need it's to "navigate" through the remaining found records(if there's any) with two buttons "Prev" & "Next"

    Thats the main question....Then we can go with the difficult one (For me of course)...

    Thanks again for your reply,

    Leo

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