Results 1 to 9 of 9
  1. #1
    Lounger
    Join Date
    Nov 2005
    Location
    Br. Columbia, Canada
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Find and display a record (2003)

    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

  2. #2
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    La Verne, California, USA
    Posts
    313
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find and display a record (2003)

    Use the wizarsd - - 3rd option.

  3. #3
    Lounger
    Join Date
    Nov 2005
    Location
    Br. Columbia, Canada
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find and display a record (2003)

    Thanks Preston.

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

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Find and display a record (2003)

    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>post 401925</post#> for instructions.

  5. #5
    Lounger
    Join Date
    Nov 2005
    Location
    Br. Columbia, Canada
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find and display a record (2003)

    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.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Find and display a record (2003)

    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.
    <UL><LI>First, give the combo box a meaningful name, for example cboFindRecord. This makes the code easier to read than something like Combo265.
    <LI>With the combo box selected, activate the Event tab of the Properties window.
    <LI>Click in the After Update event.
    <LI>Select [Event Procedure] in the dropdown list.
    <LI>Click the ... button to the right of the dropdown list.
    <LI>Make the code look like this (you can copy and paste):
    <code>
    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
    </code>
    <LI>Switch back to Access.
    <LI>Close and save the form.[/list]When you open the form, selecting a Client Number in the combo box will select the corresponding record.

  7. #7
    2 Star Lounger
    Join Date
    Nov 2003
    Location
    Vancouver, Washington, USA
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find and display a record (2003)

    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

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Find and display a record (2003)

    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.

  9. #9
    2 Star Lounger
    Join Date
    Nov 2003
    Location
    Vancouver, Washington, USA
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find and display a record (2003)

    Dear Hans,

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

    Thanks so very much,
    Rich

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •