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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

referencing an Access report object 1

Status
Not open for further replies.

Gerilee

Programmer
Mar 23, 2001
47
US
I have an Access report with a calculated field called txtrptage. It is calculated using the DateDiff function in the Control Source property of txtrptage. If it calculates to a number less than zero, I want it to display **** instead of the negative number. I put the following code in the Format event of the Detail section:

If txtrptage < 0 Then
Me.txtrptage = "****"
End If

I get a run time error that says "You can't assign a value to this object".

Can anybody help?

Thanks so much.

 
Why not simply play with the Format property of the TextBox ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV,

Thanks for the response but could you clarify that a little? I'm not sure what you mean.

Thanks!
 
When in design view set the format proerty of txtrptage to something like this:
0.00;\*\*\*\*;

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top