Hi,
I am trying to do a simple IIF in the control source of a text box but it is returning #Name?...can someone tell me what I am missing?
=IIf([OutOfOffice]![StartDate]="8/1/2011",[OutOfOffice]![EmpName])
Thanks!
Hi,
I am trying to do a simple IIF in the control source of a text box but it is returning #Name?...can someone tell me what I am missing?
=IIf([OutOfOffice]![StartDate]="8/1/2011",[OutOfOffice]![EmpName])
Thanks!
I also tried
=IIf([OutOfOffice]![StartDate]=#8/1/2011#,[OutOfOffice]![EmpName],"")
Try taking out the [OutOfOffice]! I'm assuming that the report is based on a query/Table so you only need the field name.
What is the name of the textbox?
Name of the text box is Text153.
Actually now I've come up with this (still not working lol) because what I want it to do is if the date in the table = 8/1/2011, I want it to return the employees name - Reason for out of the office....
=IIf([OutOfOffice]![StartDate]=#8/1/2011#,[OutOfOffice]![EmpName] & "-" & [OutOfOffice]![Reason])
Am I correct using the # symbol around the date? I also tried quotes and that didn't work either....
I agree with Ray... why do you need the [OutOfOffice]?
When I used the expression builder it put the table name in like that....I removed it but it still isn't working...
Is the field StartDate in the table or query that is the record source for the report?
What is the Table/Queryname the report is based on? What is in the Recordsource of the report?
That may have been part of the problem...I set it as the source, now I'm not getting the #Name? but instead it's just blank...
Yes the field StartDate is in the table I'm trying to pull from. I cannot figure out why this isn't working. It is now giving me the "Enter Parameters" box for the OutOfOffice table. I know this means something might be misspelled/missing/bad data, but I have double checked everything and no misspellings and everything is present.![]()
I recreated this table/report on my home computer, also in Access 2007 and it worked?! Exact same data, everything...it worked on my home computer but not my work computer.
However, it only returned one record, the first one in the table that had the date I was trying to pull. How do I get this to pull multiple records? There are more records with that date in the table.
Thanks!