Here´s what i´ve been working on.
I can't make search page to work.
Any help appreciated..
Leo
Printable View
Here´s what i´ve been working on.
I can't make search page to work.
Any help appreciated..
Leo
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.
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.
What need it's to "navigate" through the remaining found records(if there's any) with two buttons "Prev" & "Next"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
Thats the main question....Then we can go with the difficult one (For me of course)...
Thanks again for your reply,
Leo