Sorry to jump in but that is bad. A little bit bad when Sharon wants to
count how many applications a particular user has, overcomplicated when she
wants to add another application, and downright abysmal when she wants to
report on the names of those assigned apps.
It's a many to many relationship. The data structure you're suggesting is
breaking normalisation rules and will lead to Sharon having to throw her
computer out of a window.
Sharon... you could always try posting the code that Mr Mandeno and I have
asked for in the other version of this thread.
> Lets assume all your Application Fields are named App001 thru App125 (This
> will make life easier) and that all your check boxes are named chkApp001 thru
[quoted text clipped - 46 lines]
> > > > EmployeeAssignedApplication table that shows the applications for each
> > > > employee?
SharonInGa - 21 Apr 2005 21:31 GMT
Grahmn & Rob,
Here is the code that Previews a multi selected list in a report(credit to
Allen J Browne). How can I get this code to "Add the selections
(multi-select or checkbox) to a table"?
Private Sub cmdPreview_Click()
On Error GoTo Err_Handler
Dim varItem As Variant
Dim strWhere As String
Dim strDescrip As String
Dim lngLen As Long
Dim strDelim As String
Dim strDoc As String
strDoc = "rptApplicationUsers"
With Me.lstApplications
For Each varItem In .ItemsSelected
If Not IsNull(varItem) Then
strWhere = strWhere & strDelim & .ItemData(varItem) &
strDelim & ","
strDescrip = strDescrip & """" & .Column(1, varItem) & """, "
End If
Next
End With
lngLen = Len(strWhere) - 1
If lngLen > 0 Then
strWhere = "[AppSvcID] IN (" & Left$(strWhere, lngLen) & ")"
lngLen = Len(strDescrip) - 2
If lngLen > 0 Then
strDescrip = "ApplicationServiceNames: " & Left$(strDescrip,
lngLen)
End If
End If
If CurrentProject.AllReports(strDoc).IsLoaded Then
DoCmd.Close acReport, strDoc
End If
Exit_Handler:
Exit Sub
Err_Handler:
If Err.Number <> 2501 Then 'Ignore "Report cancelled" error.
MsgBox "Error " & Err.Number & " - " & Err.Description,
"cmdPreview_Click"
End If
Resume Exit_Handler
End Sub
> Sorry to jump in but that is bad. A little bit bad when Sharon wants to
> count how many applications a particular user has, overcomplicated when she
[quoted text clipped - 67 lines]
> each
> > > > > employee?