Conditional Formatting in Access 2010

JpSkyPilot

Registered User.
Local time
Today, 06:18
Joined
Feb 23, 2012
Messages
20
Hi:

I have a report that is a letter to drivers. If the report is for those driving vehicles 1 through 99, then the "To" field will have one employee name, however, if the vehicle number is 100 to 199 there are two employees, and each needs to be listed in the "To" text box.

I also have a "From" box and the entry here will depend on the specific PC operator and I have to fill in that box with visual basic.

I have a groupheader for vehicle number and the text boxes for from, to, etc. are in this group (I cannot do it in the detail section, because the letters may cover more than one day and the individual(s) may use more than one vehicle...so in the detail section, I have the vehicles used, the date used, etc. So, the "header" info should go in the group header.)

I tried putting the code in the On Format for the group header and nothing happens (I have a blank screen in that section of the report).

I also wanted to make the format of a text box change dependent upon the value...if it is "False" then the border would be solid, otherwise it would be transparent.

I have tried the "layout view" and the "conditional formatting" but it does not allow for any of this...any help would be appreciated.
 
I really can't make out what your question is exactly?
 
I need to fill or format a couple of the text boxes via Visual Basic. However, I try to put the Visual Basic in the "On Format" event and nothing happens. I've tried it in On Print, On Paint, etc...and it does not work.

I put:
Me.txtmytext = Admin
Me.txtDateText = Format(Date,"Short Date")

Etc. and I get nothing.

I also want one of the fields to be conditional:
If VanNr >=1 and <=99 then
Me.txtEmployee = [Employee 1]
Else
Me.txtEmployee = [Employee 1] & " and "& [Employee 2]
endif

and I get nothing.

so, how can I put data in the fields of the report like "Admin" or Date...etc? And how can I put in data conditional on the van number? Where do I put it in Events?

The issue is not for the On Open of the report because some of the fields can change from record to record.

Hope this is clearer...sorry for the convolution before
 

Users who are viewing this thread

Back
Top Bottom