Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying different data types in a single report field- possible?

Status
Not open for further replies.

benzo1

Technical User
Jan 21, 2003
17
GB
Hi,

I have a report that at the moment reflects a single date from the "launch date" field in my table. I have now updated my table so that there is a "revised launch date" field.

How can I get my report to recognise that some launch dates have been revised. Essentially, I would like my report to display the revised launch date instead of the lauch date... but also italicise the revised date so as to allow the user to differentiate between the two date types.

I hope my question was clear. Thanks in advance for any help.
 
To get the date desired is pretty simple to itlaisze it requires VBA coding.

I'll give the easy answer first if you still want the other let me know.

The control cource for the first is the "Launch date" field name. set the visible propery to NO

The second control has a control Source of the "Revised Launch Date" with its visible property set to NO as well.

The third one is the secret its control property equals...
"=IIf(IsDate([RevisedDate]),[LaunchDate],[RevisedDate])"
Where reviseddate = the control name on the report, and launch date = the launch date control name on the form.

As to informaing the user as to which is being displayed, consider this by adding one more field to the report with the following control source you could easily inform your user of the source of the data.

"=IIf(IsDate([newdate]),"Revised Date","Original Date")"

Hope this helps
Good Luck
ssecca
 
Could you not do something like the following:

Include the two hidden fields (LaunchDate and RevisedDate),and the third unbound field (DisplayDate) as suggested.

Using the OnFormat event of the Details section of the report include:

If Not IsNull(Me![RevisedDate]) Then
Me![DisplayDate].Value = Me![RevisedDate]
Me![DisplayDate].FontItalic = True
Else
Me![DisplayDate].Value = Me![LaunchDate]
Me![DisplayDate].FontItalic = False
End If Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. (Albert Einstein)

Robert L. Johnson III, MCSA, CNA, MCP, Network+, A+
Access Developer/Programmer
robert.l.johnson.iii@citigroup.com
 
Tested the above....works great! I have a sample if you would like to see it. Just send me an email to the address in my sigblock and I will forward. Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. (Albert Einstein)

Robert L. Johnson III, MCSA, CNA, MCP, Network+, A+
Access Developer/Programmer
robert.l.johnson.iii@citigroup.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top