Invalid syntax

I get the error  invalid syntax for the following line : ( summing up figures
in case GetBonus = Yes)

Bonus : iif(getBonus = -1;nz(BonusL1;0)+ NZ([BonusL2];0)+ NZ([BonusL3];0)

could  you help ?

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200712/1

0
peljo
12/14/2007 8:48:51 PM
access.queries 6343 articles. 1 followers. Follow

3 Replies
2539 Views

Similar Articles

[PageSpeed] 35

Ditch the semicolons.

iif( Formula to test,results if true, results if false.)

I would guess you want
iif(getBonus = -1,nz(BonusL1;0)+ NZ([BonusL2];0)+ NZ([BonusL3],0)




peljo via AccessMonster.com wrote:
> I get the error  invalid syntax for the following line : ( summing up figures
> in case GetBonus = Yes)
> 
> Bonus : iif(getBonus = -1;nz(BonusL1;0)+ NZ([BonusL2];0)+ NZ([BonusL3];0)
> 
> could  you help ?
> 
0
Phil
12/14/2007 9:02:10 PM
Change the semicolons to commas and add the closing paren
Bonus : iif(getBonus = -1,nz(BonusL1,0)+ NZ([BonusL2],0)+ NZ([BonusL3],0))

It will work if it is in a query,but for VBA, you need a false condition
Bonus : iif(getBonus = -1,nz(BonusL1,0)+ NZ([BonusL2],0)+ NZ([BonusL3],0), 
FalseCondition)

-- 
Dave Hargis, Microsoft Access MVP


"peljo via AccessMonster.com" wrote:

> I get the error  invalid syntax for the following line : ( summing up figures
> in case GetBonus = Yes)
> 
> Bonus : iif(getBonus = -1;nz(BonusL1;0)+ NZ([BonusL2];0)+ NZ([BonusL3];0)
> 
> could  you help ?
> 
> -- 
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200712/1
> 
> 
0
Utf
12/14/2007 9:55:04 PM
Unmatched parentheses in what you posted.

Bonus : IIF(getBonus = -1;nz(BonusL1;0)+ NZ([BonusL2];0)+ NZ([BonusL3];0))

It is possible that you need to replace the semi-colons with commas - 
depending on your operating system settings for the delimiter.  I 
suspect you are a non-US user and the ; is the valid delimiter.


'====================================================
  John Spencer
  Access MVP 2002-2005, 2007
  Center for Health Program Development and Management
  University of Maryland Baltimore County
'====================================================


peljo via AccessMonster.com wrote:
> I get the error  invalid syntax for the following line : ( summing up figures
> in case GetBonus = Yes)
> 
> Bonus : iif(getBonus = -1;nz(BonusL1;0)+ NZ([BonusL2];0)+ NZ([BonusL3];0)
> 
> could  you help ?
> 
0
John
12/15/2007 4:52:26 PM
Reply:

Similar Artilces:

Invalid File Format
When I start Excel I get an initial message that says ssipro97.dot is an invalid format. Any idea why this would come up? It doesn't seem to affect how Excel works, it's just annoyint. ...

Invalid syntax
I get the error invalid syntax for the following line : ( summing up figures in case GetBonus = Yes) Bonus : iif(getBonus = -1;nz(BonusL1;0)+ NZ([BonusL2];0)+ NZ([BonusL3];0) could you help ? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200712/1 Ditch the semicolons. iif( Formula to test,results if true, results if false.) I would guess you want iif(getBonus = -1,nz(BonusL1;0)+ NZ([BonusL2];0)+ NZ([BonusL3],0) peljo via AccessMonster.com wrote: > I get the error invalid syntax for the following line : ( summing up figures...

invalid handle
hi frds i m very new in vc++ and i m founding too much difficulty in this so plz can any one solve this problem .... actully i m inserting a image in list box using this code ........ everything is returning write thing still it is saying invalid handle after ImageList_Add(hList,m_hBmpNew,0); when i m going to dibug it plz help me BOOL Fun() { // Create 256 color image lists HIMAGELIST hList = ImageList_Create(32,32, ILC_COLOR8 , 8, 1); HBITMAP m_hBmpNew = (HBITMAP) LoadImage( AfxGetInstanceHandle(), // handle to instance "c:\\img.bmp", /...

Exchange 2007 address list (OPATH RecipientFilter syntax)
Hi, In Exchange 2003 we had a few address lists that were populated purely by membership in AD groups. The LDAP query to do this was pretty easy. How do we achieve the same thing in Exchange 2007 with the OPATH RecipientFilter syntax? Is there a way to see a list of every attribute that can be used in a recipient filter? Regards, David You can look at these articles http://msexchangeteam.com/archive/2007/01/11/432158.aspx and http://msexchangeteam.com/archive/2007/01/10/432143.aspx -- This posting is provided "AS IS" with no warranties, and confers no rights. Dgoldma...

Invalid Property Value
I have a macro that uses an input form to populate a spreadsheet. There are various validations that run prior to the data populating. On one validation if an incorrect choice has been made from a drop down box a error message prompts the user to select again form the drop down box and will not populate until a valid selection has been made. I am now getting an Excel warning message (exclamation message) saying 'Invalid Property Value' after the spreadsheet has populated which only happens if an invalid selection has been made and corrected from the drop down box. If the ...

OFX
When doing an update from my broker I get the message cannot establish secure communication with the server. Digital certificate is invalid. OFXIE12038. This is new happening in last month. Broker support says problem is Money 2002 not supported so I installed Money 2005 (with some qualms) and of course, still get the same message. I can access the brokerage website OK from Money, just cannot get statement downloads. -- Bill ...

Invalid Procedure Call on Forms
Hello, any suggestions are appreciated! I imported tables from our media database into our membership database. I was going to combine the information so that I could streamline orders with lookup fields but my supervisor didn't like it so... I went back to the media database and now NONE of the form buttons are working. The forms open, and all the reports, queries, and tables open without incident. However, when I click any button on any form (to call up a report, query or another form), I receive an error: "Invalid Procedure Call or Arguement". I tried creating a...

Invalid Operation 425
I know there are a few other threads pretaining to "Invalid Operation 425, Cash Drawer locked by another application" but the solutions given there have not solved our problem. We have multiple store locations with the exact same set-up but only one is having this problem . The problem happens most of the time but not always. Our set up is RMS version 2.0 Printer - Epson Tm-881V Cash Drawer - APG VB320 OPOS ADK 2.6 Running on Windows XP Pro Any body have an idea? -- Many thanks Jack Master Jack - Without taking time to go back against all old posts and see what is liste...

Renamed invalid sheet name
I have a routine that opens a workbook to access data and then closes it. It has worked fine for years with XP and Excel 2000. Since changing to Win 7 and Excel 2003 it will no longer automatically open. A warning box appears "Repairs to 'Workbook'" and the message "Renamed invalid sheet name". After closing the message box it renames the worksheet to "Recovered_Sheet 1" and opens the workbook. However, this is a manual process and I need it to be automated as before. What I have found (I believe) is that if the file name includes "...

Invalid object name when I try to create a scaler udf in a stored procedure.
I am trying to create a report that shows a company name, all the advisors in that company, then the company's stats (there should be one row for each company). Each of these come from a different table. The advisors are currently being listed as one per line, which means the company name and the stats are all being repeated unneccesarily. I want to concatinate the advisors, so that all the ones that belong to the same company show in the same cell. I wrote this UDF which is located right before my SP: CREATE FUNCTION [dbo].[ConcatAdvisorNames](@Company as varchar(20)) RETURNS VA...

string quotes syntax
having a senior moment... Dim Temp As Variant This works OnExit of Main form control: Me.SubForm.Form!TextBox = Me.Number This does Not work: Me.SubForm.Form!TextBox = Me.Text no error - just nothing returned to the subform TextBox Have tried to wrap with "" Me.SubForm.Form!TextBox = "Me.Text" returned literally: Me.Text Me.SubForm.Form!TextBox = "&Me.Text&" returned literally: &Me.Text& Dim to String didn't change anything tried "'" but threw an error while in vb... (double single double) what the heck ? -- NTC ...

Refreshing data results in "invalid cell reference"
I imported some data from a CSV into a worksheet. On another worksheet (named Chapel) I referenced the data in a formula: {=SUM(IF(Chapel!$A$1:Chapel!$A$1000=Categories!$A1, IF(Chapel!$C$1:Chapel!$C$1000=Categories!A$30,1,0),0))} This formula works fine. Now, if I go and refresh my data I get invalid references in my formula: {=SUM(IF(Chapel!$A$1:Chapel!#REF!=Categories!$A1, IF(Chapel!$E$1:Chapel!$E$1000=Categories!A$30,1,0),0))} Is there some way to make this work? And why do some references to Chapel change but others do not? Notice that the first reference to $A$1000 is now invalid...

Moving a file from A to B fails with incorrect syntax error
Hi, I am moving a file from c:\location a\subdir\subsubdir\file.wav to c:\location b\subdir\subsubdir\file.wav but the error message i get is "failed with error 123: The filename, directory name, or volume label syntax is incorrect." I am running on a vista home premium machine, using visual studio 6 if that helps. Any ideas? TIA Tony Tony wrote: > Hi, > > I am moving a file from c:\location a\subdir\subsubdir\file.wav to > c:\location b\subdir\subsubdir\file.wav > > but the error message i get is > > "failed with error 123: The filename,...

how to use invalidate and validate
I am using DrawRectangle and SetPixel and some other drawing functions over an image displayed in the background. I'm wondering what exactly I should be doing to make sure that when my application regains focus that things were like they were when focus was lost. I'm not quite sure what the Validate functions do, which is part of the problem. -- to reply, remove Big10 from address Andrew, There is only one way to make sure that the drawing is persistant even after another application has been activated (or indeed anything else forcing a redraw, such as the display of a dialogbox)...

Invalidate
Hi, I added a control to a View. So, I believe, that when I call Invalidate(), it effects the control and I get flicker. I am not erasing the background. BOOL CViewX::OnEraseBkgnd(CDC* pDC) { return TRUE; // return CView::OnEraseBkgnd(pDC); } Is there anything else that might be causing it? Thanks, -- dbgrpt.c -1 Computer wrote: > Hi, > > I added a control to a View. > So, I believe, that when I call Invalidate(), > it effects the control and I get flicker. > > I am not erasing the background. > BOOL CViewX::OnEraseBkgnd(CDC* pDC) > { > return TRUE; ...

The user Id is invalid.
I have been utterly unable to get the SDK to work for me, trying any permutation of credentials, explicit permissions and I always get the 'Server was unable to process request.' error message. I'm trying to access the CRM webservice from another machine, and web references are setup (I hope) correctly. On closer inspection this is the InnerXML field in the details of the exception: <error> <code>0x80041d1f</code> <description>The user Id is invalid.</description> <type>Platform</type> </error> The code that generates it? se...

Invalid Domain Name. Domain name invalid or unreachable
Hi, I am getting following error in MS CRM 4.0 when using Deployment Manager: "Invalid Domain Name. Domain name is either invalid or unreachable". Also when using the Plug-in registration tool, I am getting the same error. And I am not able to register any plug-in. Request you to please provide your inputs. Thanks in advance, help appreciated. Bharat ...

what does an "invalid sam id" meen in Outlook 2007?
I'm trying to import a .csv to Outlook. I keep getting "invalid sam id" message. the error with act3.sam translator message appears also. SAM = Security Access Manager and is not an Outlook related issue. Invalid SAM ID indicates a connection failure with your servers - something changed in your environment which made the SAM ID for the machine you are using invalid between the server and workstation. Are you using BCM? -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.c...

Invalid Database
I am running a small network (3-5 clients) with 1 POS lane. Each of the other computers has the RMS software installed. The master database is located ont the same computer that runs the POS. Here's the problem: When I test the database conncetion through Administrator Config. on any other computer, it says "Connection to the database is made but the database appears to be blank or not a valid Store Operations database." I don't understand how the database could be invalid if the POS is able to run from it. Secondly: When I try to open Store Operations...

Invalid Domain Name. Domain name invalid or unreachable #2
Hi, I am getting following error in MS CRM 4.0 when using Deployment Manager: "Invalid Domain Name. Domain name is either invalid or unreachable". Also when using the Plug-in registration tool, I am getting the same error. And I am not able to register any plug-in. Request you to please provide your inputs. Thanks in advance, help appreciated. Bharat On this posting there is some code to help you list the domains active from the machine you wish to install CRM 4.0 on. create this inside a .vbs file and run it using cscript from the system32 folder and it listed mine correctl...

invalid from address
Any external mail sent with invalid from address (eg. blank from address or email address not available in Active directory) are not going out through the smtp connector. Instead it is getting routed back to the internal exchange 5.5 server and being NDR'ed. Any help in this regard. Regards GP In news:erdWgmjgFHA.3788@tk2msftngp13.phx.gbl, GP <vguru@yahoo.com> typed: > Any external mail sent with invalid from address (eg. blank from > address or email address not available in Active directory) are not > going out through the smtp connector. Instead it is getting ...

Path name is invalid
I use Money 2006 on a laptop with Visa 32 bit. When I sign out of money it asks if i want to back up now. I reply yes and get a message path name is invalid pleaase use a valid path name. Can anyone help with this problem. tia tia, Evidently the settings for automatic backup are pointing to an invalid path. I don't quite remember where the settings are in M2006 but they are probably under something like Tools > Settings > Backup settings. A Settings dialog box should open. Make sure that the path in the Save in: section(s) is valid. -Kevin "heshey" <heshey@dis...

All of my RMS 2.0 Serial Numbers invalid
This morning when my stores opened, all of my Pos stations and HQ won't load RMS - they all state the serial numbers are invalid. The busiest week of the year and none of my RMS software works. Any ideas? Never mind, it was a Windows update. I went to the stores and rebooted twice and now everything works. "Hobby Central" wrote: > This morning when my stores opened, all of my Pos stations and HQ won't load > RMS - they all state the serial numbers are invalid. The busiest week of the > year and none of my RMS software works. Any ideas? Still,...

invalid path in services
Is there a way of changing the path in the services directory for the svhost.exe file? At present the path for the file is %fystemroot%\system32\svchost.exe -k netsvcs but it should be C:windows\system32\svchost.exe -k netsvcs. I cannot change it is it will not allow me to do it .Is there a way round this is this will not allow me to do updates as it comes up file not found update error number 0x80070002. %systemroot%\system32 and C:\windows\system32 is the same address/location; ditto for %windows%\system root Always state your full Windows version (e.g., WinXP SP3; WinXP 64...

Invalid Site Owner
I've been working for days trying to get GP Portal for GP 10 installed. I have a single MOSS server, and backend database servers. The applications work, administration works...everything seems fine. When I try to install BPortal, I can't get around this error: Invalid site owner or The existing Business Framework Login ID or the password is invalid. Please verify this information and try again. There are exactly 2 articles on customer source addressing this....I have attempted each work around. One article says to rename the domain, which is NOT an option. I have totally rebu...