Results 1 to 3 of 3

Thread: Microsoft Access creating a List box

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2005
    Posts
    10

    Microsoft Access creating a List box

    New to access trying to create the following list box see attached pic

    i dont know how to link the search criteria to the to the List box
    And on the bottom you will notice option buttons so if user wants to
    search by account # user selects option button called Account# and so forth.

    You will notice a command button called find patient. Once command button is pressed opens the form called Search Patient

    when user selects patient user clicks on go to patient
    this part works find






    I placed everything under the detail section of the form
    I have the following code

    Private Sub List12_AfterUpdate()
    ' Find the record that matches the control.
    Dim rs As Object

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[Account #] = " & Str(Nz(Me![List12], 0))
    If Not rs.EOF Then Me.Bookmark = rs.Bookmark
    End Sub


    Private Sub Go_To_Record_Click()
    On Error GoTo Err_Go_To_Record_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Patient Info"
    stLinkCriteria = "[Account #]=" & Me![Account #]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Exit_Go_To_Record_Click:
    Exit Sub

    Err_Go_To_Record_Click:
    MsgBox Err.Description
    Resume Exit_Go_To_Record_Click

    End Sub
    Private Sub Exit_Click()
    On Error GoTo Err_Exit_Click


    DoCmd.Close

    Exit_Exit_Click:
    Exit Sub

    Err_Exit_Click:
    MsgBox Err.Description
    Resume Exit_Exit_Click

    End Sub



    Any Ideas Please Help.
    Attached Files Attached Files

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