Control format property in OnFormat event



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....

.



Relevant Pages

  • RE: How to replicate Excels numeric "Accounting" format in Access
    ... Now each report setup actually only does one page of the final report for ... you can use some code to accomplish the format display. ... control that you want to appear as Accounting format and enter "Accounting" ... Dim ctl As Control ...
    (microsoft.public.access.reports)
  • Re: Alternate rows with bold font
    ... Viewed report in design view ... This is why I need to alternate between bold and normal font. ... property of a line control. ... Code the Detail Section Format event: ...
    (microsoft.public.access.reports)
  • RE: Eliminating #Error from Report
    ... design mode of the report. ... If you are calculating ... I would try making a new control in the report ... The format for my newly created SalesCompare ...
    (microsoft.public.access.reports)
  • Re: Numbering
    ... If GrpNameCurrent = GrpNamePrevious Then ... I have a report with multiple records in it. ... Add an unbound control to the Page Footer. ... Paste the code into the Page Footer Format event. ...
    (microsoft.public.access.reports)
  • Re: Visible = True Vs Visble = False
    ... I realize that I should have said REPLACE all that code in the Detail format ... do this all on a COPY of your report. ... another control to determine if the fields should print. ... If Me.Function.OldValue strrptRIAFunction Then ...
    (microsoft.public.access.modulesdaovba)