This in a Text Box control on an access report. I get the "wrong number of arguments" message, but what is the correct number of arguments? - =IIf(([Hours]=4),IIf([MAIL_LOG_TIME])<=#12:00:00 PM#),
-
([MAIL_LOG_DATE]&" "&DateAdd("h",4,[MAIL_LOG_TIME]),""))
Your Syntax is incorrect, Copy-N-Paste the following to the Control Source of your Text Box: - =IIf([Hours]=4,IIf([MAIL_LOG_TIME]<=#12:00:00 PM#,[MAIL_LOG_DATE]+DateAdd("h",4,[MAIL_LOG_TIME]),""),"")
6 1386
Go through the expression and match all the opening parentheses to its closing parentheses
Still not working, wrong number of arguemnts: - =IIf(([Hours]=4),IIf([MAIL_LOG_TIME])<=#12:00:00 PM#),([MAIL_LOG_DATE])&" "&DateAdd("h",4,([MAIL_LOG_TIME]))
Because you still haven't matched them up correctly. Show me which opening parentheses you think matches up with which closing parentheses.
Break out the innermost blocks and look at those separately before trying to combine them all together.
Your Syntax is incorrect, Copy-N-Paste the following to the Control Source of your Text Box: - =IIf([Hours]=4,IIf([MAIL_LOG_TIME]<=#12:00:00 PM#,[MAIL_LOG_DATE]+DateAdd("h",4,[MAIL_LOG_TIME]),""),"")
Thanks, that worked. I am still having trouble counting out the arguments.
Thanks
-ray
The syntax for iif is this:
For any of those variables, you can embed another function, another iif in your example. But you must maintain the same syntax. So if you want to replace b with this:
Then you just fully replace b with that. Resulting in this:
You can't just drop random variables and move the parentheses around willy nilly.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Chris Geerdink |
last post by:
combo with PHP. what is wrong with the Javascript?
else
{
include("mysql.php");
$query1 = mysql_query("INSERT INTO gbook (naam, email, text) VALUES
('".$_POST."', '".$_POST."',...
|
by: asdf |
last post by:
Hello!
Can someone tell me whats wrong with this piece of code:
Option Compare Database
Option Explicit
Sub retrieve()
Dim rst As ADODB.Recordset
Dim i As Integer
|
by: Alexandre Martins |
last post by:
Provider=Microsoft.Jet.OLEDB.4.0;UserId=Admin;Password=teste;Data
Source=C:\Inetpub\wwwroot\inktoner\dados\db_inktoner.mdb;Persist Security
Info=True
I can't connect in my database !
whats...
|
by: aa |
last post by:
When I am reading from local disk (d:), everithing is OK, but then I am
reading from map disk I am geting the this error. Whats wrong. Thanks
Server Error in '/Extra' Application....
|
by: mahsa |
last post by:
Hi do you know whats wrong with this code?
<asp:HyperLink id="HLink_Help" runat="server" NavigateUrl='<%# "javascript:window.open('comments.aspx?id=1,width=500,height=600, scrollBars=yes');"...
|
by: '~=_Slawek_=~' |
last post by:
$DOW = (jddayofweek(unixtojd(mktime(1, 1, 1, $month, $day, $year)))+6)%7;
$DOW= (jddayofweek(juliantojd($month, $day, $year))+6)%7;
The results are supposed to be the same, but they are not....
|
by: Mike Barnard |
last post by:
It's a simple test... VERY SIMPLE. But...
In an external stlyesheet some attributes don't show. With the same
styles cut and pasted to the test internally it works as expected.
Anyone tell...
|
by: Martin Jørgensen |
last post by:
Hi,
"C primer plus" p.382:
Suppose we have this declaration:
int (*pa);
int ar1;
int ar2;
int **p2;
|
by: islayer |
last post by:
can someone tell me what is wrong with the bold code? i am just learning perl. the program should create a perl file with a random name (5 letters, followed by a number), but the name is always just...
|
by: x40 |
last post by:
I try to learn python thru solving some interisting problem, found
google trasure hunt,
write first program ( but cant find whats wrong).
# Unzip the archive, then process the resulting files to...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |