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

HELP: Conditional Formatting with VBA Code

P: n/a
Can you write conditional VBA code that affects only one or two
records on a continuous subform?

I have a form with a subform on it. The parent/ child field that links
the forms is CaseID. The main form has personal info on it. The
subform deals with each case's Issues, Decisions, and Notices.

Issues, Decisions, and Notices are all combo boxes. Not all Issues
have Notices. Issues 25-50 have Notices. Issues 1-24 and 51-100 don't
have Notices. I wrote a simple Case statement that makes the Notices
combo boxes visible only when an Issue between 25 and 50 is selected.
The VBA code works but has a drawback- the Notices combo boxes appear
in all of my records on my continuous subform when one of my Issues is
between 25 and 50.

For example, case 7 has 3 Issues. Issue#1 = 1, Issue#2 = 75, Issue#3 =
25. After I select an Issue between 25 and 50 for one of my Issues
combo boxes, the Notices combo boxes appear with each Issue, and I
only want the Notices combo box to be visible with Issue#3.

Is there a way to code it so that the Notices combo box only appears
on those records where the Issue is between 25 and 50? Or is that a
lot of code?

Thanks for your input!

Megan
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
The problem is that there is really only one control that is displayed
multiple times. To handle this problem, Conditional Formatting was
introduced in Access 2000. To get to this, open the form in design mode,
right click the control, and choose Conditional Formatting. If you are using
Access 97 or older, you may find some help from Stephen Lebans:

http://www.lebans.com/formatbycriteria.htm
http://www.lebans.com/alternatecolordetailsection.htm

--
Wayne Morgan
MS Access MVP
"Megan" <me**************@hotmail.com> wrote in message
news:5c**************************@posting.google.c om...
Can you write conditional VBA code that affects only one or two
records on a continuous subform?

I have a form with a subform on it. The parent/ child field that links
the forms is CaseID. The main form has personal info on it. The
subform deals with each case's Issues, Decisions, and Notices.

Issues, Decisions, and Notices are all combo boxes. Not all Issues
have Notices. Issues 25-50 have Notices. Issues 1-24 and 51-100 don't
have Notices. I wrote a simple Case statement that makes the Notices
combo boxes visible only when an Issue between 25 and 50 is selected.
The VBA code works but has a drawback- the Notices combo boxes appear
in all of my records on my continuous subform when one of my Issues is
between 25 and 50.

For example, case 7 has 3 Issues. Issue#1 = 1, Issue#2 = 75, Issue#3 =
25. After I select an Issue between 25 and 50 for one of my Issues
combo boxes, the Notices combo boxes appear with each Issue, and I
only want the Notices combo box to be visible with Issue#3.

Is there a way to code it so that the Notices combo box only appears
on those records where the Issue is between 25 and 50? Or is that a
lot of code?

Thanks for your input!

Megan

Nov 12 '05 #2

P: n/a
Has anyone noticed anything different in Conditional Formatting in
A2003? I have some simple Conditions set up to change the colour of a
field that no longer works properly (worked fine in A2000)
--
regards,

Bradley
Wayne Morgan wrote:
The problem is that there is really only one control that is displayed
multiple times. To handle this problem, Conditional Formatting was
introduced in Access 2000. To get to this, open the form in design
mode, right click the control, and choose Conditional Formatting. If
you are using Access 97 or older, you may find some help from Stephen
Lebans:

http://www.lebans.com/formatbycriteria.htm
http://www.lebans.com/alternatecolordetailsection.htm
"Megan" <me**************@hotmail.com> wrote in message
news:5c**************************@posting.google.c om...
Can you write conditional VBA code that affects only one or two
records on a continuous subform?

I have a form with a subform on it. The parent/ child field that
links the forms is CaseID. The main form has personal info on it. The
subform deals with each case's Issues, Decisions, and Notices.

Issues, Decisions, and Notices are all combo boxes. Not all Issues
have Notices. Issues 25-50 have Notices. Issues 1-24 and 51-100 don't
have Notices. I wrote a simple Case statement that makes the Notices
combo boxes visible only when an Issue between 25 and 50 is selected.
The VBA code works but has a drawback- the Notices combo boxes appear
in all of my records on my continuous subform when one of my Issues
is between 25 and 50.

For example, case 7 has 3 Issues. Issue#1 = 1, Issue#2 = 75, Issue#3
=
25. After I select an Issue between 25 and 50 for one of my Issues
combo boxes, the Notices combo boxes appear with each Issue, and I
only want the Notices combo box to be visible with Issue#3.

Is there a way to code it so that the Notices combo box only appears
on those records where the Issue is between 25 and 50? Or is that a
lot of code?

Thanks for your input!

Megan


--
regards,

Bradley
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.