Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Aug 2001
    Location
    Can Jose, CA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    select record in query to display on form (Access2002)

    Does anyone know a way to select a record in a displayed query and have that record displayed in a form? Want to use a unique id field, click on that field in row of interest and then open a form with that record's info. Similar sequence to selecting a hyperlink from a web page.
    Usage is for a failure database. Initial query will display user input criteria similar keyword records and then user selects specific record.

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

    Re: select record in query to display on form (Access2002)

    I never let an end user view a query directly, and I wouldn't know how to do what you want in a query. Create a (continuous) form based on the query instead, then you can use the On Dbl Click event of a control (or of the form) to open another form with the details:

    Private Sub ID_DblClick(Cancel As Integer)
    If Not IsNull(Me.ID) Then
    DoCmd.OpenForm FormName:="frmDetails", WhereCondition:="ID=" & Me.ID
    End If
    End Sub

    (This is just an illustration, actual details will be different.)

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: select record in query to display on form (Access2002)

    That sort of thing can't be done directly from a query - you will need a form that lets you display the results of a query, either in a tabular continuous form, with a button for each record, or you can create a combo box that does the same sort of thing using the wizard for combo boxes. Forms doing these kind of things are a common occurance in Access databases.
    Wendell

  4. #4
    Star Lounger
    Join Date
    Aug 2001
    Location
    Can Jose, CA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: select record in query to display on form (Access2002)

    Thanks for input. I have not used tabular/continous forms before. I created a simple one and it will perform nicely.

Posting Permissions

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