Avatar of Danny Reader
Danny Reader
Flag for United States of America asked on

Pull up record/form from list box

In the attached Access database file, there's a form called 'Frm_SearchMulti'.  When you highlight a record in the list box and click the View Record, I want the 'Frm_Accounts' to pop up and show the highlighted record.  What happens instead is a parameter box pops up, and when you enter the ID of the highlighted record, the form does appear with that record.  How can I modify it to eliminate the parameter pop up and have it go directly to the highlighted record?

Here's the event procedure for the view record button:

On Error GoTo Err_Command60_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "FRM_Accounts"
   
    stLinkCriteria = "[PeopleSoftID]=" & Me![SearchResults]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command60_Click:
    Exit Sub

Err_Command60_Click:
    MsgBox Err.Description
    Resume Exit_Command60_Click
CC_Sample.accdb
Microsoft Access

Avatar of undefined
Last Comment
Danny Reader

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
PatHartman

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Danny Reader

ASKER
Problem solved!  Thanks!
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck