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?
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.
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)
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.
It was added, maybe i didn't save it before i uploaded the DB....
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.
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
I must have placed the code in the wrong place before as it's now not doing the same. No Error
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.
Did you read me last post...
All i need to do now is transform this into my project. Many Thanks for your help....
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.
Yes, Many thanks i will no change this to resolved, many thanks again.......