- Local time
- Today, 13:15
- Joined
- Jan 23, 2006
- Messages
- 15,530
You should use code tags when putting code in a post. It will keep all the formatting/indenting and make the code easier to read.
For clarity is this the code you are talking about
I'm not sure what lstJust is, but it is a separate listbox. It will have its own Rowsource.
So you need to establish a new recordset object to identify which data should be shown in lstJust.
For clarity is this the code you are talking about
Code:
With Me.lstJust
'here we are getting the Problemid of the selected Items '*********************************
For Each varItem In .ItemsSelected
If Not IsNull(varItem) Then
rst.AddNew
recCnt = recCnt + 1
rst!ProblemID = lstJust.ItemData(varItem)
rst!NonconformanceRecordID = Me.NonconformanceRecordID
'*********You don't need to store desc of problem in the the Problem_Record table ****************
'*********But this where it would go *******************
'rst!desc = .Column(2, varItem)
rst.Update
End If
Next
End With
I'm not sure what lstJust is, but it is a separate listbox. It will have its own Rowsource.
So you need to establish a new recordset object to identify which data should be shown in lstJust.