Results 1 to 4 of 4

Thread: Updating recordset with custom search from

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    North East (UK)
    Posts
    204

    Cool

    Hi all,
    I have created a custom search form where the user is asked to input the staff number and then select search. My problem is, how do I make the staff details form go to the record specified by the staff number in the search form. I have included the code from my search form. I am using SQL Server.

    Private Sub cmdStaffSearch_Click()

    Dim strCriteria As String

    frmStaffSearch.Show vbModal
    'define the search criteria
    strCriteria = "[Number] LIKE '" & frmStaffSearch! txtBrigadeNumberSearch.Text & "'"
    With rscmdStaffDets
    .Find strCriteria
    If .EOF Then
    MsgBox ("Staff member not found please check the Staff Number entered")
    End If
    End With
    frmStaffdets1.refresh
    Unload Me
    End Sub

    Cheers

  2. #2
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    You could pick up the bookmark from the record found and then use the Move command with ADO.

    Hope that helps,

    P.
    Not nearly so tired now...

    Haven't been around much so be gentle...

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    North East (UK)
    Posts
    204
    Hi Paul, I am a little unsure what you mean do you have a simple example.
    Cheers

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    North East (UK)
    Posts
    204
    Thanks Paul,
    will give it a try.

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