473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

access VBA - highlighting cells under conditions

Hi all

sorry if this has been answered but on a tight schedule so haven't got time to search

I'm making a database to record and refer results to several tests in a unit of exams. There are 8 available units each with 4 possible tests.

now this isn't a necessity but in order to make things easier for us to admin the database I want to put in a few little functions.

before I start - I'm using access 2007, and the database is set up so that you can select candidates in the main form, and their test units/results/dates/times etc appear in a subform beneath their details

right - what i'd like to do is set a few conditions:

1) in the test mark field, if it's over a certain mark (say 75%, which would view just as 75) i'd like the background colour of that field only in the record (that's in the subform :P) to turn green

2) As the candidate can take each unit 4 times I'd like to be able to easily see how many of each unit has been taken, so in the test unit box (which is numbered 1-8) I'd like to be able to change the background colour of just that field in the record (again in the subform :P) so that each unit has a different colour.

so for instance - if a candidate takes unit 1, and passes I'd like the unit 1 box to display as yellow, and the mark box to display as green
If that candidate then takes unit 5 and fails, I'd like the unit 5 box to show up in say blue instead, and the mark box to display as red

does that make sense? - if yes can it be done?
Jul 8 '08 #1
3 1832
Dököll
2,364 Expert 2GB
Hello alex091088180189!

I am adding your post to the Access Forum for added support. Good luck with the project!

Dököll
Jul 10 '08 #2
mshmyob
904 Expert 512MB
Yes it can easily be done.

Just hilite the field in design view and then choose Conditional formatting in the ribbon and put in your parameters and colours.

cheers,
Jul 10 '08 #3
mshmyob
904 Expert 512MB
Actually I noticed you said that the results appear in a subform. This changes things. The maximum changes in cell colours would be limited to 4. So if you are using a continuous form then you can only make 4 colours appear in 4 different cells.

If it is just a single form it will work as indicated in previous post.

cheers,
Jul 10 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: rob | last post by:
Hi all, I've got a csv file which I will need to import into an access db via asp. The csv file will be imported every day of each month so there will be duplicates which will not need to be...
14
by: lance | last post by:
Hi, I am a JS newbie. Hopefully the answer to my question is not trivial. I have written a simple webpage that presents a table. A JS function allows the viewer to click on a cell and each...
11
by: Mr. Smith | last post by:
Hello all, My code can successfully open, write to, format and save several worksheets in a workbook then save it by a given name, close and quit excel. My problem is that if I try and do it...
7
by: JohnSmith90 | last post by:
I want to highlight the entire cell data for all rows of a particular column in a data grid. I do not want to fill the back ground color of the cell. How to do that in a data grid? <span...
0
by: mwhalber | last post by:
Hi, I am developing an application which highlights changes in streaming data (i.e. market changes.) I have developed this initially using the BackColor and ForeColor settings on the relevant...
4
by: lord.zoltar | last post by:
I am wondering how you guys highlight cells or rows (by changing the text or background colour) in a DataGridView. Right now, I apply styles to certain rows or cells in the CellFormatting even...
3
by: gemini | last post by:
hi, can any body tell me how i can highlight continuous cells cells of a table with mouse events
5
by: mhumlie | last post by:
I am having a problem that shows up in MS Excel and Access that may be associated with a MySQL driver 3.51 that I use to link to a database. On two separate computers, both with MS Office...
24
by: joeldault | last post by:
Question For Microsoft Access Data Base -------------------------------------------------------------------------------- I am Trying to create a single formula that would do the following: If...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.