Need help with default values...

  • Thread starter Thread starter Louis Herndon
  • Start date Start date
L

Louis Herndon

Hello,

I am progressing with my database, and appreciate the help
I have received from users on this group. Another
problem. I have simple forms that I enter data into. If
there is no data relevant to the record then I leave it
blank. This is fine for viewing. But I also have reports
related to the data on those forms. How can I force any
blank fields for a given record to display "None" by
default on a report. I am a newbie to Vbasic but am
learning it quickly.

Any help would be appreciated.
 
You really can't. You can make it look that way though...

Instead of putting your actual field on the report, put an unbound text box.
In the sorce, you will need an "if" satement that says to do one thing if
the field is blank, and another if it contains data. You would need to do
this for every field you wish to apear this way. Your statement might look
like...

=IIf([SomeFieldNameHere]="","None",[SomeFieldNameHere)

or if using a checkbox....

=IIf([SomeFieldNameHere],"True","False")


or maybe for a date to be filled in...

=IIf([SomeDateFieldHere]="","___/___/___",[SomeDateFieldHere])




Hope those examples help,

Rick B



Hello,

I am progressing with my database, and appreciate the help
I have received from users on this group. Another
problem. I have simple forms that I enter data into. If
there is no data relevant to the record then I leave it
blank. This is fine for viewing. But I also have reports
related to the data on those forms. How can I force any
blank fields for a given record to display "None" by
default on a report. I am a newbie to Vbasic but am
learning it quickly.

Any help would be appreciated.
 
I left off a bracket in that first statement...

=IIf([SomeFieldNameHere]="","None",[SomeFieldNameHere])



You really can't. You can make it look that way though...

Instead of putting your actual field on the report, put an unbound text box.
In the sorce, you will need an "if" satement that says to do one thing if
the field is blank, and another if it contains data. You would need to do
this for every field you wish to apear this way. Your statement might look
like...

=IIf([SomeFieldNameHere]="","None",[SomeFieldNameHere)

or if using a checkbox....

=IIf([SomeFieldNameHere],"True","False")


or maybe for a date to be filled in...

=IIf([SomeDateFieldHere]="","___/___/___",[SomeDateFieldHere])




Hope those examples help,

Rick B



Hello,

I am progressing with my database, and appreciate the help
I have received from users on this group. Another
problem. I have simple forms that I enter data into. If
there is no data relevant to the record then I leave it
blank. This is fine for viewing. But I also have reports
related to the data on those forms. How can I force any
blank fields for a given record to display "None" by
default on a report. I am a newbie to Vbasic but am
learning it quickly.

Any help would be appreciated.
 
Back
Top