straybullet
IS-IT--Management
Since adding the following, the person I've been trying to help with a database has been getting an error when trying to convert to 2007. It's 3356, telling her she is trying to open a database which is opened exclusively... I've run a decompile, used the Compile selection on the Debug menu, made sure the default open mode is shared. I know I'm missing something... any ideas?
Let them hate - so long as they fear... Lucius Accius
Code:
Function Concatenate(pstrSQL As String, _
Optional pstrDelim As String = ", ") _
As String
Dim rs As New ADODB.Recordset
rs.Open pstrSQL, CurrentProject.Connection, _
adOpenKeyset, adLockOptimistic
Dim strConcat As String 'build return string
With rs
If Not .EOF Then
.MoveFirst
Do While Not .EOF
strConcat = strConcat & _
.Fields(0) & pstrDelim
.MoveNext
Loop
End If
.Close
End With
Set rs = Nothing
If Len(strConcat) > 0 Then
strConcat = Left(strConcat, _
Len(strConcat) - Len(pstrDelim))
End If
Concatenate = strConcat
End Function
Let them hate - so long as they fear... Lucius Accius