Results 1 to 2 of 2
  1. #1
    SteveL5231 is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2010
    Posts
    1

    List box questions

    I have a list box on a form and want to do the following:

    1) If the user double-clicks on a specific record in the listbox, have a 2nd form open right to that selected record.

    or

    2) If the user double-clicks in the white area below the displayed records, have the 2nd form open to an empty record so he/she can create a new record.

    Can all of this be done?

    Here is my code so far. When the user double-clicks anywhere in the list box, the 2nd form opens but displays all the records associated to the key field. Then they have to navigate through the records to edit an existing record or create a new record.

    Private Sub List131_DblClick(Cancel As Integer)



    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "frmProjectDetail"

    stLinkCriteria = "[JobN]=" & Me![List131].Column(1)
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    End Sub

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    maybe you need to add filteron after the form open:

    DoCmd.OpenForm stDocName, , , stLinkCriteria
    forms(stDocName).filteron=true

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

Similar Threads

  1. Few N00b Questions
    By lucas.robb in forum Database Design
    Replies: 2
    Last Post: 09-20-2010, 04:58 PM
  2. Input data from one list box to another list box
    By KellyR in forum Programming
    Replies: 0
    Last Post: 06-04-2010, 11:24 AM
  3. List box to populate other list boxes
    By Nathan in forum Forms
    Replies: 0
    Last Post: 03-03-2009, 07:22 PM
  4. 3 questions about forms
    By surfer_rosa in forum Forms
    Replies: 0
    Last Post: 10-08-2008, 09:59 AM
  5. newbie questions
    By bigmac in forum Access
    Replies: 0
    Last Post: 10-07-2008, 12:53 AM

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