• Find and display a record (2003)

    Author
    Topic
    #429156

    Is there a way to set up on a form that if a particular Client ID is selected from a drop down list, that record is displayed on the form? I have looked through the Microsoft Help and came up with the topic of “Find a record by selecting a value from a list” but while the drop down list shows the Client ID’s, when you select a particular ID it doesn

    Viewing 0 reply threads
    Author
    Replies
    • #998722

      Use the wizarsd – – 3rd option.

      • #998932

        Thanks Preston.

        I did that but once the list box is created and the client ID is selected, the record does not display.

        • #998939

          Just “the record does not display” is not enough to go on.. We’d have to know a lot of details or see the database. Could you post a stripped down copy of your database? See post 401925 for instructions.

          • #999058

            Sorry Hans,

            I thought i had posted the database. Here is the file. The Problem is with the Clint Information form. What i would like to do is to have it set up so that a user can select a particular record and view it so that they can update it. I check microsoft help, as well as tried Preston’s suggestion, but while you can select the record from a listbox or combo box (i have tried both) it won’t display the record.

            Thanks for your help.

            • #999062

              It looks as if you haven’t used the combo box wizard, for there is no code for the combo box. The wizard always creates an After Update event procedure.
              However, you can easily create one yourself.

              • First, give the combo box a meaningful name, for example cboFindRecord. This makes the code easier to read than something like Combo265.
              • With the combo box selected, activate the Event tab of the Properties window.
              • Click in the After Update event.
              • Select [Event Procedure] in the dropdown list.
              • Click the … button to the right of the dropdown list.
              • Make the code look like this (you can copy and paste):

                Private Sub cboFindRecord_AfterUpdate()
                Dim rst As Object
                Set rst = Me.RecordsetClone
                rst.FindFirst "[Client Number] = '" & Me.cboFindRecord & "'"
                Me.Bookmark = rst.Bookmark
                Set rst = Nothing
                End Sub
              • Switch back to Access.
              • Close and save the form.
                [/list]When you open the form, selecting a Client Number in the combo box will select the corresponding record.
      • #1027572

        Hi Preston,

        This is exactly what I need to do, but when I get the Combo Box (or List Box) Wizard, the third option is not shown? I do see the first two options, however. Why would I not have that third option available? Is there a switch I need to turn on?

        See attachment screen capture.

        We recently upgraded from Office 2000 to Office 2003. Are there Access 2003 features that we didn’t get installed?

        Thanks so much, and,
        G’Day,
        Rich

        • #1027579

          The third option is only displayed if your form is bound to a table, query or SQL statement. It is not shown if your form is unbound, because you cannot search for records on an unbound form.

          • #1027635

            Dear Hans,

            Thanks so much. It worked perfectly, just as you said.

            Thanks so very much,
            Rich

    Viewing 0 reply threads
    Reply To: Find and display a record (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: