By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,676 Members | 1,636 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,676 IT Pros & Developers. It's quick & easy.

access won't close after conditional formatting

P: n/a
Hello all!

For quite some time now, I've got the following problem:

Access won't close properly when a user closes the application. An
ACCESS process stays active and that process can only be terminated by
pressing [CTRL]+[ALT]+[DEL] and then terminate the process.

I searched the entire internet and found out that there could be two
things wrong (both of them are mentioned in the bug list on the access
web: http://www.mvps.org/access/bugs/bugs0005.htm):

1. DAO recordsets are not closed (or set to nothing properly).
2. You cannot reference a boolean control in the following way:
[if me.Parent!chkSomeCheckBox then], this should be
[If me.Parent!chkSomeCheckBox = True then]

Both of these problems are NOT my problem!!!

I found out (after days of ^@#$ debugging) that a field (in a
Datasheet form) which has conditional formatting causes the problem.
If I delete the conditional formatting everything goes OK!

To be exact, the following is happening:
There is a table, tblCourse:
- pkCourse_id (primary key)
- txtCourseName (text)
- dtDate (date)
- ynFull (boolean)

There is a datasheet (sub)form which is based upon this Course table
and holds two text fields:
1. Course name, bound to txtCourseName
2. A field that has it's control source set to the following:
=getCourseStatusString([pkCourse_id];[dtDate];[ynFull])

This function (getCourseStatusString(arg1 as Integer, arg2 as Date,
arg3 as boolean)) returns one of the following strings, based upon the
properties of the Course.
- Ended (when the field dtDate is <= Date()).
- Full (When the ynFull field is TRUE, no more people can visit this
course)
- Partly (there are people who are visiting this crouse, but there is
still place for more people)
- None (Nobody goes to this course).

As mentioned before, this field had conditional formatting. (Applied
by doing Format->Conditional formatting). It has the following three
formatting conditions:

1. Field value is --- equal to --- "None" --> background is Red
2. Field value is --- equal to --- "Full" --> background is Green
3. Field value is --- equal to --- "Partly" --> background is Orange

I no conditions are met, the background will remain white.
Alle works just fine! BUT, if you close access, a process stays open
and can only be closed by using the Task Manager.

If you get rid of the conditional formatting everything works fine!

So, I am looking for answers here! I work with ACC2000, WIN2000,
latest servicepacks for both Win and Acc.
Any help would be appreciated, thanks in advance.

Jouke
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hello, Jouke,

I had exactly the same problem recently. Was going to post about it, but
that was when the MSBlast virus was going around so I deferred doing so, and
then forgot about it.

I had conditional formatting in a (continuous form) subform that greyed the
background of any row not matching the date in the parent form. I used
identical conditional formatting statements for all the controls. Made it
easy for user to see all records, which they need, yet easily distinguish
the records before and after the date in question.

The weird thing was, I only had the problem when I applied the formatting to
one particular column (control) that was in the middle of the subform. I
did everything including a) renaming the control, b) renaming the field, c)
recreating the control from a duplicate of another control that worked, d)
recreating the control from scratch, and e) recreating the form and subform.
Nothing worked.

So I compromised. Instead of greying out the entire row, I just greyed out
the first 5 columns. The users are happy and I regained my sanity.

Regards,
Krisa


"Jouke Langhout" <jl*@cypres.nl> wrote in message
news:db**************************@posting.google.c om...
Hello all!

For quite some time now, I've got the following problem:

Access won't close properly when a user closes the application. An
ACCESS process stays active and that process can only be terminated by
pressing [CTRL]+[ALT]+[DEL] and then terminate the process.

I searched the entire internet and found out that there could be two
things wrong (both of them are mentioned in the bug list on the access
web: http://www.mvps.org/access/bugs/bugs0005.htm):

1. DAO recordsets are not closed (or set to nothing properly).
2. You cannot reference a boolean control in the following way:
[if me.Parent!chkSomeCheckBox then], this should be
[If me.Parent!chkSomeCheckBox = True then]

Both of these problems are NOT my problem!!!

I found out (after days of ^@#$ debugging) that a field (in a
Datasheet form) which has conditional formatting causes the problem.
If I delete the conditional formatting everything goes OK!

To be exact, the following is happening:
There is a table, tblCourse:
- pkCourse_id (primary key)
- txtCourseName (text)
- dtDate (date)
- ynFull (boolean)

There is a datasheet (sub)form which is based upon this Course table
and holds two text fields:
1. Course name, bound to txtCourseName
2. A field that has it's control source set to the following:
=getCourseStatusString([pkCourse_id];[dtDate];[ynFull])

This function (getCourseStatusString(arg1 as Integer, arg2 as Date,
arg3 as boolean)) returns one of the following strings, based upon the
properties of the Course.
- Ended (when the field dtDate is <= Date()).
- Full (When the ynFull field is TRUE, no more people can visit this
course)
- Partly (there are people who are visiting this crouse, but there is
still place for more people)
- None (Nobody goes to this course).

As mentioned before, this field had conditional formatting. (Applied
by doing Format->Conditional formatting). It has the following three
formatting conditions:

1. Field value is --- equal to --- "None" --> background is Red
2. Field value is --- equal to --- "Full" --> background is Green
3. Field value is --- equal to --- "Partly" --> background is Orange

I no conditions are met, the background will remain white.
Alle works just fine! BUT, if you close access, a process stays open
and can only be closed by using the Task Manager.

If you get rid of the conditional formatting everything works fine!

So, I am looking for answers here! I work with ACC2000, WIN2000,
latest servicepacks for both Win and Acc.
Any help would be appreciated, thanks in advance.

Jouke

Nov 12 '05 #2

P: n/a
Hello Krisa,

First of all, thanks for your quick answer.
If I read your post correctly, you solved your problem by formatting
multiple columns instead of one (a column somewhere in the middle).

My formatted column is the most left column in a Datasheet (sub)form,
so I could try to format the other columns as well, in the hope that
the problem will be solved by doing so.
I think the position of the column in the form doesn't have anything
to do with the problem, because a column somwhere in the middle of
your form is giving you a hard time and a most left column in my form
is making me crazy. I can give it a try ofcourse.

The thing I forgot to mention is that the problem ONLY occurs in a
runtime environment. The problem is that all the users HAVE a Access
runtime environment, so I HAVE to solve this problem AND FAST!!

Thanks again for your answer, and I will try your solution to solve
this irritating problem.

Jouke.
Nov 12 '05 #3

P: n/a
Hello Jouke,

Sorry I wasn't clearer. No, I did not try formatting multiple columns
instead of one. I started out with all the columns formatted, and then
discovered, by removing the formatting from the columns one by one, that it
was a particular column that was causing the problem. It did not matter
where the column was.

So, instead of formatting all the columns, I simply formatted the ones to
the left of the problem one. While not as ideal as having all the columns
formatted, the users say they can still easily distinguish "target" from
"non-target" records.

I hope this makes it clearer for you.

Regards,
Krisa

"Jouke Langhout" <jl*@cypres.nl> wrote in message
news:db**************************@posting.google.c om...
Hello Krisa,

First of all, thanks for your quick answer.
If I read your post correctly, you solved your problem by formatting
multiple columns instead of one (a column somewhere in the middle).

My formatted column is the most left column in a Datasheet (sub)form,
so I could try to format the other columns as well, in the hope that
the problem will be solved by doing so.
I think the position of the column in the form doesn't have anything
to do with the problem, because a column somwhere in the middle of
your form is giving you a hard time and a most left column in my form
is making me crazy. I can give it a try ofcourse.

The thing I forgot to mention is that the problem ONLY occurs in a
runtime environment. The problem is that all the users HAVE a Access
runtime environment, so I HAVE to solve this problem AND FAST!!

Thanks again for your answer, and I will try your solution to solve
this irritating problem.

Jouke.

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.