Auto fill in text box using iif function

A

Ace

I am trying to create a Class roster report that will list all employees
scheduled to attend a class and auto fill in there name in the signature text
box if the date of the class was inputted and leave blank if date was not
entered.
Fields from query [Employee name] [Date Taken]; text box lable "Signature"
I've tried the following source control in the text box: IIF [Date Taken]
not is null, [Employee name]
Any suggestions?
 
D

Duane Hookom

You tried what "IIF [Date Taken] not is null, [Employee name]"?
There are no ()s or = in that expression.

I think you want something like:
=IIf(Not IsNull([Date Taken] ), [Employee name],Null)
IIf() has three arguments.
 
A

Ace

Thank you for the quick and accurate response.

Duane Hookom said:
You tried what "IIF [Date Taken] not is null, [Employee name]"?
There are no ()s or = in that expression.

I think you want something like:
=IIf(Not IsNull([Date Taken] ), [Employee name],Null)
IIf() has three arguments.

--
Duane Hookom
Microsoft Access MVP


Ace said:
I am trying to create a Class roster report that will list all employees
scheduled to attend a class and auto fill in there name in the signature text
box if the date of the class was inputted and leave blank if date was not
entered.
Fields from query [Employee name] [Date Taken]; text box lable "Signature"
I've tried the following source control in the text box: IIF [Date Taken]
not is null, [Employee name]
Any suggestions?
 
M

MikeJohnB

I have tested
=IIf(Not(IsNull([Date Taken])),[Employee name],Null)

Not sure of the relevance of the ( after Not but this works. Maybe Duane's
does as well?

Kindest Regards
Mike B
--
Advice to Posters.
Check your post for replies or request for more information.
Consider providing some feed back to the response you have recieved.
Kindest Regards Mike B


Duane Hookom said:
You tried what "IIF [Date Taken] not is null, [Employee name]"?
There are no ()s or = in that expression.

I think you want something like:
=IIf(Not IsNull([Date Taken] ), [Employee name],Null)
IIf() has three arguments.

--
Duane Hookom
Microsoft Access MVP


Ace said:
I am trying to create a Class roster report that will list all employees
scheduled to attend a class and auto fill in there name in the signature text
box if the date of the class was inputted and leave blank if date was not
entered.
Fields from query [Employee name] [Date Taken]; text box lable "Signature"
I've tried the following source control in the text box: IIF [Date Taken]
not is null, [Employee name]
Any suggestions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top