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

If Then Statements in Reports 1

Status
Not open for further replies.

jbento

Technical User
Jul 20, 2001
573
0
0
US
I hope someone can help with this. I have been struggling with this for awhile.

I have a table that has a field called "BoardRationale". In that field there is default data called "Is This Expedited?".

This table is connected to a form and report. When the user is in the form they are supposed to delete the data (Is This Expedited?) in the BoardRationale field if it is not expedited, but you know how users are, they sometimes don't do what they are supposed to do. I would like to have this data automatically removed if the user didn't do it, when the report comes up. I have used the following code in the details section of the report, for the On Format and On Print area:

If Me![BoardRationale] = "Is This Expedited?" Then
Me![BoardRationale] = Null

This is not working. What am I doing wrong? Someone please help. Thank you all so much.
 
Sometimes it is easier to create an Unbound Text Box and use the original bound text box in the statement. Then you can go to Properties, Format in the original text box and enter No in Visible.
If the original text box is [BoardRationale], in the Unbound Text Box, Properties,Data, Control Source,try this:

=IIF([BoardRationale]="Is This Expedited?", "Null", [BoardRationale])

Good luck
(Properties,Data, Control Source, has a create statement option where you can select the needed data fron a list)

 
Sailalong,
I will try this tomorrow, and I will let you know the outcome. Thanks so much my friend:).
 
Sailalong,
I have been struggling with this problem for sometime now, but thanks to YOU it's over. IT WORKED PERFECT!!!!! Thanks so very much.
 
New Problem:

I would like to have an If..Then statement to put a record at the top of a record set with a condition.

I have a record with a field that contains a "." So if any record in the record set/sorted group has the ".", I would like for that record to be at the top of the record set/sorted group, regardless of any other conditions. By the way, this recordset has 2 other fields.

If Me![ExampleField1] = "." Then
Me![ExampleField1] = Top of RecordSet
Me![ExampleField2] = Top of RecordSet
Me![ExampleField3] = Top of RecordSet

I know my coding on the Then statements are wrong, and that's where I need help.

Can someone please help me with this? Thanks so much in advance. Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!
 
I figured it out:)

I just had to change the sorting and grouping area of the report.

Thanks. Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top