Page 3 of 3 FirstFirst 123
Results 31 to 42 of 42
  1. #31
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,973

    It works with the button version. Are you recoding the demo or your project? You want to provide the revised demo for me to work with?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  2. #32
    1eye1vision is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    35
    OK,
    I was working on the Demo, i have uploaded the demo for you, if you click within the blank selected Persons listbox you will see the error i am getting.
    Also with the Qty boxes, if you place a number within these the same number appears on every record. (i suppose this will change when bound them to a Qty record)

  3. #33
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,973
    Well, I am not seeing the line I suggested you add:

    If Me.lstSelected.ItemsSelected.Count > 0 Then
    'code to remove selected items
    End If

    Yes, unbound control will show same value for all records.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #34
    1eye1vision is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    35
    It was added, maybe i didn't save it before i uploaded the DB....

  5. #35
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,973
    I modified the lstSelected_DblClick procedure with this and it works. Post your procedure for analysis.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #36
    1eye1vision is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    35
    Private Sub lstSelected_DblClick(Cancel As Integer)
    Dim strSQL As String
    Dim strwhere As String
    Dim db As DAO.Database
    Dim varItem As Variant
    If Me.lstSelected.ItemsSelected.Count > 0 Then
    For Each varItem In Me.lstSelected.ItemsSelected
    strwhere = strwhere & "personnbr=" & Me.lstSelected.ItemData(varItem) & " OR "
    Next varItem
    strwhere = Left(strwhere, Len(strwhere) - 4)
    strSQL = "Delete * from tblPersonClasses where classid=" & Me.ClassId & " AND (" & strwhere & ");"
    Set db = CurrentDb
    db.Execute strSQL
    Me.lstAvailable.Requery
    Me.lstSelected.Requery
    Set db = Nothing
    SetQtyBoxes
    End If
    End Sub

  7. #37
    1eye1vision is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    35
    I must have placed the code in the wrong place before as it's now not doing the same. No Error

  8. #38
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,973
    That is exactly what I have. Mine works!!!
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #39
    1eye1vision is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    35
    Did you read me last post...

  10. #40
    1eye1vision is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    35
    All i need to do now is transform this into my project. Many Thanks for your help....

  11. #41
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,973
    So you are a Happy Camper now?!!
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  12. #42
    1eye1vision is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    35
    Yes, Many thanks i will no change this to resolved, many thanks again.......

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Combo box Value Must Show an object: How To
    By vdanelia in forum Forms
    Replies: 6
    Last Post: 02-03-2011, 04:16 AM
  2. Replies: 3
    Last Post: 11-02-2010, 10:14 AM
  3. Replies: 1
    Last Post: 08-05-2010, 12:11 PM
  4. Subform will not show data
    By Brian62 in forum Forms
    Replies: 2
    Last Post: 02-19-2010, 10:43 AM
  5. how to show all data in this querey
    By grad2009 in forum Queries
    Replies: 3
    Last Post: 02-08-2010, 07:35 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