Does Access have formats like Excel does?

  • Thread starter Thread starter Roy Ristie
  • Start date Start date
R

Roy Ristie

Hi folks,

I need to highlight negative numbers in red on a sub-form.

Q1. is there a way to do this without writing code? I'm thinking along the
lines of excel's custom cell formattig.

Q2. if i have to write code can someone suggest how best to do it. by this i
mean, where can i hang my code on(event-wise).

mucho thanks

roy
 
Hi Roy,

A1: No.

A2: Look up Conditional Formatting in Access Help.

HTH
 
Yes, Access has formats that can do this.

From the Help file:

Custom number formats can have one to four sections with semicolons (;) as
the list separator. Each section contains the format specification for a
different type of number.

Section Description
First The format for positive numbers.
Second The format for negative numbers.
Third The format for zero values.
Fourth The format for Null values.

For example, you could use the following custom Currency format:

$#,##0.00[Green];($#,##0.00)[Red];"Zero";"Null"

This number format contains four sections separated by semicolons and uses a
different format for each section.
If you use multiple sections but don't specify a format for each section,
entries for which there is no format either will display nothing or will
default to the formatting of the first section.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top