![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have problem with one of my A2003 databases. I'm getting strange behaviour when I type in a module. For example if I type 'dim x as string' this is what happens: - after the m of dim then the word dim turns red - after I type the x then the space disappears leaving me with dimx Another example, if I try x = "test" then - as I type the first double quote, another appears Needless to say this is driving me mad. I've compacted and repaired, decompiled/recompiled, created a new database and imported all objects, tried on another machine. Nothing has worked. Other databases on my system are fine. Any ideas please |
#3
| |||
| |||
|
|
"Dave G @ K2" <davegriffith... (AT) gmail (DOT) com> wrote in messagenews:b8606110-7385-4f74-b4df-d02057c55037 (AT) d16g2000yqb (DOT) googlegroups.com... I have problem with one of my A2003 databases. I'm getting strange behaviour when I type in a module. For example if I type 'dim x as string' *this is what happens: - after the m of dim then the word dim turns red - after I type the x then the space disappears leaving me with dimx Another example, if I try x = "test" then - as I type the first double quote, another appears Needless to say this is driving me mad. I've compacted and repaired, decompiled/recompiled, created a new database and imported all objects, tried on another machine. Nothing has worked. Other databases on my system are fine. Any ideas please You wouldn't have a form with a running timer open when this occurs, would you? ... |
#4
| |||
| |||
|
|
You wouldn't have a form with a running timer open when this occurs, would you? ... Yes I do. Now I don't. Solved. |
#5
| |||
| |||
|
|
On Fri, 9 Jul 2010 08:24:19 -0700 (PDT), "Dave G @ K2" davegriffiths70 (AT) gmail (DOT) com> wrote: You wouldn't have a form with a running timer open when this occurs, would you? ... Yes I do. Now I don't. Solved. smile What I do is I check to see if this is an MDE. If yes then it's the users running the database so I set the timer. Public Function IsMDE() As Boolean Dim db As DAO.Database On Error GoTo tagError Set db = CurrentDb If db.Properties("MDE") = "T" Then IsMDE = True End If tagNoProperty: db.Close: Set db = Nothing On Error GoTo 0 Exit Function tagError: Select Case Err.Number Case 3270 ' Property not found IsMDE = False Resume tagNoProperty Case Else MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure IsMDE of Module mdltt_FixReferences" End Select End Function Tony -- Tony Toews, Microsoft Access MVP Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/ For a convenient utility to keep your users FEs and other files updated see http://www.autofeupdater.com/ |
#6
| |||
| |||
|
|
Here's how I'd write that: Public Function IsMDE() As Boolean On Error Resume Next IsMDE = (CurrentDb.Properties("MDE") = "T") End Function |
#7
| |||
| |||
|
|
"Stuart McCall" <smccall (AT) myunrealbox (DOT) com> wrote in news:Fr8_n.169687$aS3.133763@hurricane: Here's how I'd write that: Public Function IsMDE() As Boolean On Error Resume Next IsMDE = (CurrentDb.Properties("MDE") = "T") End Function I would never write code like that, because there is a history with On Error Resume Next not going out of scope. When I see that code, I react "lazy programmer." Use an error handler that ignores the specific error and then you don't run the danger of losing error reporting in other places. In fact, that's what Tony's code does, and it can be used for any database, not just the one currently opened in the UI. So, it seems to me your version is inferior to Tony's in every way. -- David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/ |
#8
| |||
| |||
|
|
it can be used for any database, not just the one currently opened in the UI. |
#9
| |||
| |||
|
|
"David W. Fenton" <XXXusenet (AT) dfenton (DOT) com.invalid> wrote in message news:Xns9DB291529B81Cf99a49ed1d0c49c5bbb2 (AT) 74 (DOT) 209.136.88... "Stuart McCall" <smccall (AT) myunrealbox (DOT) com> wrote in news:Fr8_n.169687$aS3.133763@hurricane: Here's how I'd write that: Public Function IsMDE() As Boolean On Error Resume Next IsMDE = (CurrentDb.Properties("MDE") = "T") End Function I would never write code like that, because there is a history with On Error Resume Next not going out of scope. When I see that code, I react "lazy programmer." Use an error handler that ignores the specific error and then you don't run the danger of losing error reporting in other places. In fact, that's what Tony's code does, and it can be used for any database, not just the one currently opened in the UI. So, it seems to me your version is inferior to Tony's in every way. I take it you didn't notice the <g,d&r> at the end. Sigh. Get over it David. |
![]() |
| Thread Tools | |
| Display Modes | |
| |