473,796 Members | 2,483 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

operand without an operator

46 New Member
this code looks perfect to me - what am i doing wrong to get the error?

=IIf([Conftype]=41,"Morning Reports",IIf([ConfType]=4,"Noon Conference",IIf ([ConfType]=9,"Grand Rounds")))
Jul 5 '07 #1
3 12792
garethfx
49 New Member
Nothing - it works in a query if you have places a name before the te statement

IE. Conference_Type :=IIf([Conftype]=41,"Morning Reports",IIf([ConfType]=4,"Noon Conference",IIf ([ConfType]=9,"Grand Rounds")))

If you have just

=IIf([Conftype]=41,"Morning Reports",IIf([ConfType]=4,"Noon Conference",IIf ([ConfType]=9,"Grand Rounds")))
Then its not going to work as its not asigned
else

Look at the table what have you designated the 41, 4 , 9 ETC as, is it text or number??

The IIF statement is expecting a number I suspect you have it as TEXT
If this is the case place "" around the 41 etc
=IIf([Conftype]="41","Morni ng Reports",IIf([ConfType]="4","Noon Conference",IIf ([ConfType]="9","Grand Rounds")))


Gareth
Jul 5 '07 #2
teneesh
46 New Member
Thanks - the numbers are declared as numbers. the statement is in the property box in access under source for the value (on the report design) ConfType.


Nothing - it works in a query if you have places a name before the te statement

IE. Conference_Type :=IIf([Conftype]=41,"Morning Reports",IIf([ConfType]=4,"Noon Conference",IIf ([ConfType]=9,"Grand Rounds")))

If you have just

=IIf([Conftype]=41,"Morning Reports",IIf([ConfType]=4,"Noon Conference",IIf ([ConfType]=9,"Grand Rounds")))
Then its not going to work as its not asigned
else

Look at the table what have you designated the 41, 4 , 9 ETC as, is it text or number??

The IIF statement is expecting a number I suspect you have it as TEXT
If this is the case place "" around the 41 etc
=IIf([Conftype]="41","Morni ng Reports",IIf([ConfType]="4","Noon Conference",IIf ([ConfType]="9","Grand Rounds")))


Gareth
Jul 5 '07 #3
kepston
97 Recognized Expert New Member
Thanks - the numbers are declared as numbers. the statement is in the property box in access under source for the value (on the report design) ConfType.
The ControlSource for ConfType can not be an expression that checks itself.
Where and when does your error appear?
Jul 6 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1806
by: John Doe | last post by:
I've got the action '+' stored as the variable 'plus', that is plus='+' Now I want to use the variable plus in an equation: 5 plus 7, just line 5 + 7 How do I do that? Dan
1
5038
by: jayj0nes | last post by:
I'm querying a Mas90 db via ADO in Access. The following SQL gives me the error "Invalid Operand for Operator: =" "SELECT * from GL_DetailPosting where PostingDate >= '#01/01/2004#'" These other queries work just fine, and they return valid data in the PostingDate field: "SELECT * from GL_DetailPosting" "SELECT * from GL_DetailPosting order by PostingDate DESC" Any ideas where I am going wrong? I've tried just about every syntax I
2
4070
by: Dylan Parry | last post by:
Hi folks, I've been getting the following warning when compiling my code, "Bitwise-or operator used on a sign-extended operand; consider casting to a smaller unsigned type first", and although it doesn't have any detrimental effect, I would love to be able to get rid of it. The code that it refers to is: public static int RGB(byte r, byte g, byte b) {
1
3790
by: Fir5tSight | last post by:
Hi, I am using a DataView to displaying a records from datatable. I have a filter that I define it as follows: "Status = '' || Status <'Scanned'" The problems is that I get an error about "Missing operand before '|' operator".
19
2515
by: Rajesh S R | last post by:
Consider the following code: int main() { struct name { long a; int b; long c; }s={3,4,5},*p; p=&s;
7
5049
by: somenath | last post by:
Hi All, I am trying to undestand "Type Conversions" from K&R book.I am not able to understand the bellow mentioned text "Conversion rules are more complicated when unsigned operands are involved. The problem is that comparisons between signed and unsigned values are machine- dependent, because they depend on the sizes of the various integer types. For example, suppose that int is 16 bits
6
1888
by: captainmorgan | last post by:
I have attempted to use the following IIF statement in a query, with no success. Iif(="580" OR "585", Iif(Month()=Month(Now()), =+40), Iif(Month()=Month(Now()), =+100) Iif(Month()=Month(Now()),=+100)) I tried to include a field in my query name Charge using the, Charge:Iif(...code above...) Method, but I get the following error;
4
6011
by: Light1 | last post by:
Hi - I am completely new to access - this is my first project and I have a question that is probably extremely easy for most. I am trying to take two fields of information and combine them in to one field on a report. I have the following code in the Control Source: =&” “& I receive the error "You may have entered an operand without an operator" What am I missing? From everything I have looked at, it seems like it should work. ...
8
4504
by: glitke | last post by:
I need the quantity entered in a field to be <= a certain quantity. I've opened the field properties and entered the following under the "Validation Rule". <= ( sum ( ( ! ) Where ( ( ! = ) AND ( ! = ) AND ( ! = "Received" Or "Shipped" Or "Scrapped" ) ) ) ) I get the error message: "The expression you entered contains invalid syntax." "You may have entered an operand without an operator." Any ideas or additional info needed?
5
26437
by: curtok | last post by:
I am having trouble trying to get and expression to work. I keep getting the same syntax error, you may have entered and operand without an operator. What i am trying to do: one field contains a number which start with either a 1, 2, 3, or 4 and I want the previous field to automatically fill in a correct item based on what the number starts with. This is the expression that I was trying to modify >...
0
9528
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10455
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10173
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7547
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6788
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5441
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4116
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.