Results 1 to 2 of 2
  1. #1
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496

    Basic listbox question open form on click but second id value in 2nd column

    I have a listbox which displays performers bookings as well as the schools attached and it includes the id of the performer and the id of the school in the first two columns

    I would like to open a form when you double click the booking however I can't get it to relate.
    Code:
    Private Sub lstBookings_DblClick(Cancel As Integer)
    
    
    DoCmd.OpenForm "frmSchoolsFound", , , [NewSchoolsID] = [NewSchoolsID]
    
    End Sub
    DoCmd.OpenForm "frmSchoolsFound", , , "NewSchoolsID=" & [NewSchoolsID]

    and

    DoCmd.OpenForm "frmSchoolsFound", , , me.lstBookings.Column(2) = [NewSchoolsID]



    don't seem to work either.

    Form opens but not to the correct record.

  2. #2
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Never mind answered my own

    DoCmd.OpenForm "frmSchoolsFound", , , "[NewSchoolsID]=" & Me.lstBookings.Column(4)

    moved the column and put it at .001cm;

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

Similar Threads

  1. Double click on listbox to open up form
    By EthanMoist in forum Forms
    Replies: 14
    Last Post: 05-21-2013, 02:10 PM
  2. On Double Click Open Form with two criteria
    By AndreasPanayiotou in forum Programming
    Replies: 3
    Last Post: 09-10-2012, 08:47 AM
  3. Replies: 2
    Last Post: 04-24-2012, 01:15 PM
  4. Replies: 10
    Last Post: 02-20-2012, 11:25 AM
  5. Mouse click to open form
    By darryl.charles in forum Programming
    Replies: 0
    Last Post: 09-05-2008, 10:33 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