Results 1 to 3 of 3
  1. #1
    lbradbury11 is offline Novice
    Windows 10 Office 365
    Join Date
    May 2023
    Posts
    1

    How to generate the a form with a record selected from a list box

    I have a list box on the form that lists the all the records, I'd like users to be able to click on the record in the list box. After update it will populate the form with the record that was selected. What do I need to put in for the After Update, I used the macro builder to search for a record, but that is where I stall.

  2. #2
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,880
    try the find first method.

    something like:


    Code:
       Dim rs As DAO.Recordset
        Set rs = Me.Recordset
    
    
        With rs
        
            .FindFirst "SomeField = " & Somefield
    
    
            If Not rs.NoMatch Then
                Me.Bookmark = .Bookmark
            Else
                MsgBox "Not Found"
            End If
            
        End With
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  3. #3
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    Quote Originally Posted by lbradbury11 View Post
    I have a list box on the form that lists the all the records, I'd like users to be able to click on the record in the list box. After update it will populate the form with the record that was selected. What do I need to put in for the After Update, I used the macro builder to search for a record, but that is where I stall.
    if the form is bound to a table/query then you could use the wizard to create a combo box control in the Header section of the form which would find the required record after being selected.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

Please reply to this thread with any new information or opinions.

Similar Threads

  1. How to generate reports based on selected datas
    By choimunken in forum Reports
    Replies: 8
    Last Post: 04-11-2019, 10:28 PM
  2. Replies: 6
    Last Post: 09-06-2016, 02:46 PM
  3. Replies: 4
    Last Post: 07-27-2016, 12:07 PM
  4. Replies: 11
    Last Post: 09-22-2013, 08:05 PM
  5. Replies: 7
    Last Post: 08-19-2011, 02:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums