Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
Sorry nope. I tried a db repair n fix but that didn;t do anything. Its after I've checked several of the tables links. Once its up no table opens, and you cannot do anything with the db (including save). Looks like Access is opening a table link to get the info but is not closing afterwards... sigh.
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
post #11 was because you wanted an error message. That comes if I try to run anything once (and only after) the cannot open tables message appears. before that if I were to run anything it would work fine.
What I was trying to find is why if I am only moving the pointer over table links to see where they are linked to Access complains. It has nothing to do with my code because I have not run it (I held shift as I opened it - 58 tables later... msg).
Its probably a bug that ms introduced to boost us up to 2007... but that may be a more sinacle/copnspiracy theorist view
Does that help?
If you want the code in that particular sub I can post it...
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
I'll post the whole module (its to do with filling listboxes) however I think if I get the error message then even Select * from table won't work....
Sub in question is : CListSBUserSections
* Can't post - its too long in text hehe
Code:
Dim rst As DAO.Recordset
Dim lngLoop As Long
Dim strSql As String
Dim lngR As Long, lngStart As Long, lngMR As Long
On Error Resume Next
CMlngMaxCols = 2
strSql = "SELECT" & vbCrLf
strSql = strSql & " tblLUUserSections.UserSectionID, tblLUUserSections.UserSection, sq.CountOfScreenDescription as Totalscrs"
strSql = strSql & " FROM tblLUUserSections LEFT JOIN"
strSql = strSql & " (SELECT" & vbCrLf
strSql = strSql & " tblLUUserSections.UserSectionID, Count(tblLUUserScreens.ScreenDescription) AS CountOfScreenDescription" & vbCrLf
strSql = strSql & " FROM " & vbCrLf
If Not (blnModeDev Or ublnIsDev) Then
strSql = strSql & "(" & vbCrLf
End If
strSql = strSql & " tblLUUserSections" & vbCrLf
strSql = strSql & " INNER JOIN tblLUUserScreens ON tblLUUserSections.UserSectionID = tblLUUserScreens.SectionID" & vbCrLf
If Not (blnModeDev Or ublnIsDev) Then
strSql = strSql & " ) inner JOIN tblLUUserToScreens ON tblLUUserScreens.ScreenID = tblLUUserToScreens.ScreenID" & vbCrLf
strSql = strSql & " where tblLUUserToScreens.UserId = " & ulngUserID & vbCrLf
End If
'v2.0.4
strSql = strSql & IIf(Not (blnModeDev Or ublnIsDev), " AND", " WHERE")
strSql = strSql & " tblLUUserScreens.hidefromsb=false" & vbCrLf
strSql = strSql & " GROUP BY tblLUUserSections.UserSectionID" & vbCrLf
strSql = strSql & " ) AS sq ON tblLUUserSections.UserSectionID = sq.UserSectionID"
strSql = strSql & " ORDER BY tblLUUserSections.UserSection;"
Set rst = DBEngine(0)(0).OpenRecordset(strSql, , dbOpenSnapshot)
If rst.EOF Then
CMlngMaxRows = 1 + IIf(CMblnUseHeader, 1, 0)
ReDim CMaryOfData(CMlngMaxRows, CMlngMaxCols)
Else
rst.MoveLast
rst.MoveFirst
lngMR = rst.RecordCount
ReDim CMaryOfData(lngMR, CMlngMaxCols)
End If
lngStart = 0
If CMblnUseHeader Then
CMaryOfData(0, 0) = "Section ID"
CMaryOfData(0, 1) = "Section"
lngStart = 1
End If
If rst.EOF Then
CMaryOfData(lngStart, 0) = "-1"
CMaryOfData(lngStart, 1) = "No Records to show"
Else
'v2.0.9
' changed the view - only shows those with screens
CMlngMaxRows = lngStart
For lngR = 0 To lngMR - 1
If Nz(rst("Totalscrs"), 0) > 0 Then
CMaryOfData(CMlngMaxRows, 0) = Nz(rst("usersectionID"), -1)
CMaryOfData(CMlngMaxRows, 1) = Nz(rst("usersection"), "") & " (" & Nz(rst("Totalscrs"), 0) & ")"
CMlngMaxRows = CMlngMaxRows + 1
End If
rst.MoveNext
Next
End If
rst.Close
Set rst = Nothing
ReDim CMaryOfWidths(CMlngMaxCols)
For lngLoop = 0 To CMlngMaxCols
CMaryOfWidths(lngLoop) = 1250
Next
CMaryOfWidths(0) = 0
If Err.Number <> 0 Then
MsgBox "Error filling list box (SB User Sections)" & vbCrLf & Err.Number & vbCrLf & Err.Description, vbOKOnly + vbExclamation
Err.Clear
End If
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...