Connecting Tech Pros Worldwide Forums | Help | Site Map

Control format property in OnFormat event

Nigel C
Guest
 
Posts: n/a
#1: Nov 13 '05
Hi,
I am going round in circles...
I am trying to produce a report based upon the information gathered
into a temp table.

Each column (stored as a text field) in the table holds weekly
information but each row may contain different information - ie.,
currency, text, percentages.

I have added an extra field to determine the format type.

I can control the backcolour and forecolour of the information using
the OnFormat event however, the next stage is to present this
information with the correct formatting.

As I have mentioned earlier, all weekly data is stored as text.

I can set the controls' ControlSource
=iif([FormatTypeID] = 5, Format([200630],"Currency",[200630])
This works fine on the property page - however if I try to set this at
runtime in the Detail_OnFormat event - obviously, I can not as it wont
allow this property to change at this time.

I have also tried to use the FORMAT property
eg., txtWeek30.Format = "Currency"

and

txtWeek30 = Format(txt30,"Currency")

The latter produces an error, while setting the format property seems
not to have any effect...

Eventual report layout....
Title Week 29 Week 30 Week 31
Invoiced 11 2 31
Invoiced Value £150 £1290 £45000
Employees Present 98% 100% 85%
Happy Clients R A G


I want to have control of the formatting of the week number controls...
Any help appreciated....

Nigel C
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Control format property in OnFormat event


I guess that I could format the information and save it back to the
temp table - and just present this information as it is a text field!

Is there an easier way?

Closed Thread