Text box/label name manipulation... (1 Viewer)

Blackelise

aka Andrew
Local time
Today, 01:03
Joined
Jun 13, 2012
Messages
35
Hi again,

head somewhere sort again....

I wish to have the title of a report (and simular on a form) that is based on the value of a three date fields held on the report/supporting table.

So I have a Quote/Order/Invoice report.

I have three date fields; QuoteDate, AcceptedDate & JobCompletedDate wish are populated as the Quote moves through the process.

So the title on each page of the report needs to be:
"Quote" if QuoteDate <> Null and AcceptedDate = Null
"Estimate" if AcceptedDate <> Null
"Invoice" if JobCompletedDate <> Null
you get the picture.

I've tried a function in the control Source but this does not change as each page is generated, I've tried various Event options but the report does not fire any events, that I can see, as each page is generated.

There must be away....your experience is sought please. Thanks.
 

Anakardian

Registered User.
Local time
Today, 02:03
Joined
Mar 14, 2010
Messages
173
I think I would make so you get an error if you try to show a report that does not fulfil the criteria. Even better would be to not allow the user to select a report that dos not fulfil the criteria.

As for the title you can make a text box and set it to lookup the valus you need using dlookup or if you already have the values on a form, use them from there.
Remember you can combine several valus by using the "&" beteen each field as well as inserting spaces or other characters where you need them.
 

vbaInet

AWF VIP
Local time
Today, 01:03
Joined
Jan 22, 2010
Messages
26,374
Show us the function you said you tried. You need the following functions:

IIF() and IsNull()
 

Blackelise

aka Andrew
Local time
Today, 01:03
Joined
Jun 13, 2012
Messages
35
Hi vbaInet,

got the nulls with debug and trial & error....work well on the forms.

I'm going to give the user three options for printing - Quote, Order & Invoice - and then push the title through from the selection along with a filter. Might need help with openargs on docmd.openreport though nearer the time....

cheers.
 

vbaInet

AWF VIP
Local time
Today, 01:03
Joined
Jan 22, 2010
Messages
26,374
If it's related to this thread feel free to post your questions here. If not, you will need to create a new thread.

Let us know how you get on.
 

Users who are viewing this thread

Top Bottom