From: Dave G on
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

From: Stuart McCall on
"Dave G @ K2" <davegriffiths70(a)gmail.com> wrote in message
news:b8606110-7385-4f74-b4df-d02057c55037(a)d16g2000yqb.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? ...


From: Dave G on
On 9 July, 10:12, "Stuart McCall" <smcc...(a)myunrealbox.com> wrote:
> "Dave G @ K2" <davegriffith...(a)gmail.com> wrote in messagenews:b8606110-7385-4f74-b4df-d02057c55037(a)d16g2000yqb.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? ...

Yes I do. Now I don't. Solved. Thanks a million
From: Tony Toews on
On Fri, 9 Jul 2010 08:24:19 -0700 (PDT), "Dave G @ K2"
<davegriffiths70(a)gmail.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/
From: Stuart McCall on
"Tony Toews" <ttoews(a)telusplanet.net> wrote in message
news:632i361vbsldo8ebippggnr63u624d64rl(a)4ax.com...
> On Fri, 9 Jul 2010 08:24:19 -0700 (PDT), "Dave G @ K2"
> <davegriffiths70(a)gmail.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/
>

Here's how I'd write that:

Public Function IsMDE() As Boolean
On Error Resume Next
IsMDE = (CurrentDb.Properties("MDE") = "T")
End Function

<g,d&r>