470,647 Members | 1,230 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,647 developers. It's quick & easy.

Weird form problem

Hi

Access 97: I have a form which works fine. I added the following code to the
On-Current event of the form;

If Forms![MyForm].MyBoundField Then
Forms![MyForm].MyRectangle.BorderColor = 255
Else
Forms![MyForm].MyRectangle.BorderColor = 12632256
End If

The problem is that if I run the app, go to this form and without doing
anything else, simply try to close access using X at the top right, the db
app closes by the access is merely minimised. From this point access will
not close, (it will minimise, maximise etc. though). I have to then kill it
using task manager and end task. I have done compact & repair and also
decompiled a few times and also imported into a new db a few times. Nothing
helps. Of course if I comment out the above code then everything works fine.

What is the problem? Why is the above code causing this problem?

Thanks

Regards
Nov 13 '05 #1
1 1178
John wrote:
Hi

Access 97: I have a form which works fine. I added the following code
to the On-Current event of the form;

If Forms![MyForm].MyBoundField Then
Forms![MyForm].MyRectangle.BorderColor = 255
Else
Forms![MyForm].MyRectangle.BorderColor = 12632256
End If

The problem is that if I run the app, go to this form and without
doing anything else, simply try to close access using X at the top
right, the db app closes by the access is merely minimised. From this
point access will not close, (it will minimise, maximise etc.
though). I have to then kill it using task manager and end task. I
have done compact & repair and also decompiled a few times and also
imported into a new db a few times. Nothing helps. Of course if I
comment out the above code then everything works fine.

What is the problem? Why is the above code causing this problem?


Believe it or not, try...

If Forms![MyForm].MyBoundField = True Then
Forms![MyForm].MyRectangle.BorderColor = 255
Else
Forms![MyForm].MyRectangle.BorderColor = 12632256
End If

Access doesn't like the inferred test for true against Boolean fields.
There is a KB article that describes this issue I believe.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by redneck_kiwi | last post: by
reply views Thread by Deutsche Dogge | last post: by
3 posts views Thread by Benjamin Z. Gregorian | last post: by
2 posts views Thread by Christian Kreimer | last post: by
5 posts views Thread by Peter Oliphant | last post: by
3 posts views Thread by Nick Goloborodko | last post: by
11 posts views Thread by ChrisM | last post: by
1 post views Thread by Korara | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.