Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3694532
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:30:29+00:00 2026-05-19T04:30:29+00:00

I have a access 2007 report for which one of the fields returns a

  • 0

I have a access 2007 report for which one of the fields returns a numerical value of $0 if there no dollar amount associated with the project listed, else it returns a dollar amount greater than $0.

What I want to do is build the report so that if the field value = $0, I want it to read “TBD” (without the quotes) else, I want it to return the dollar amount.

Two part question–first, what Sub class would I write the code under?

And, how would I go about writing the if else statement?

Here is what I came up so far and it doesn’t do anything (no errors, just returns the report with the $0’s printed where no dollar amount is available).

Private Sub Cost_AfterUpdate()
If ([YearofExpenditureCost] >= 0) Then
Me.Cost = "TBD"
Else: Me.Cost = [YearofExpenditureCost]
End If

Where the [Cost] is the name of the text box containing the ControlSource value of [YearofExpenditureCost].

Many thanks in advance for any advice you can offer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:30:29+00:00Added an answer on May 19, 2026 at 4:30 am

    You can use an immediate If as the Control Source of a textbox on the report. Ensure that the testbox has a name other than any of the fields in the recordsource:

    =IIF(YearofExpenditureCost=0, "TBD",YearofExpenditureCost)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a MS Access 2007 report which is based on a query that
I have a table of data in MS Access 2007. There are 6 fields
I have an access 2007 Database that outputs a report in excel format, the
I have a legacy MS Access 2007 table that contains 52 fields (1 field
I have a database in access 2007 accdb extension , there are more or
I have got a table in MS Access 2007 with 4 fields. Labour Cost
I have a table in an Access 2007 database. All fields are of type
I have an Access 2007 report that prompts for a range of dates. It
I have an access 2007 table with about 3000 records, to which I have
I have a report template in Word that pulls tables from an Access 2007

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.