473,657 Members | 2,534 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What is wrong with this VBA CODE

1 New Member
What is wrong with the following code :
Expand|Select|Wrap|Line Numbers
  1. If C.SentOn <> "" Then
It keeps erroring. The same code runs perfectly in other modules.
Mar 15 '14 #1
2 1221
Seth Schrock
2,965 Recognized Expert Specialist
If C.SentOn is null, then you will get an error because you can't compare null to anything. If this is the problem, then the fix would be
Expand|Select|Wrap|Line Numbers
  1. If C.SentOn & "" <> "" Then
By concatenating a zero-length string to C.SentOn, you make it not null without changing the value that you are comparing.
Mar 15 '14 #2
NeoPa
32,568 Recognized Expert Moderator MVP
I'm sure if the code errors then it will give number and description information about the particular error. This essential information is missing from your question for some reason.
Mar 15 '14 #3

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

Similar topics

3
6648
by: RobertTG | last post by:
Someone please translate the code below into English... Particularly the indicated line Thanks function attachComment() { var aForms = document.getElementsByTagName("FORM"); for (var i = 0; i < aForms.length; i++) {
13
2133
by: dbuchanan | last post by:
This code resets a form with two cbo's (comboBoxes) and one datagrid. The first cbo (cboSelection) selects a main table and filters the second cbo. The second cbo (cboView) selects the secondary table which determine the dataAdapter used to fill the dataGrid. Both cbo's are populated by filling dataAdapters. This code just empty's the datagrid, cbo's and dataset so the user can start over to view another set of data. \\
9
1973
by: oddvark | last post by:
Hello, under vc7.1 this code compiles: if (!parent.fillTool) parent.fillTool.dispose; where dispose is a method of fillTool. Notice that dispose does not have ( ) behind it. Under vc8, this generates an error.
1
1283
by: locy | last post by:
can someone explain to me "what does this code do" class baseclass { public: virtual void runme() { std::cout<<"are you"<<std::endl; }
5
2092
by: lucas | last post by:
is a javascript file; is ajax? or javascript but in hidden code? eval(function(p,a,c,k,e,d) {e=function(c) {return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))}; if(!''.replace(/^/,String)) {while(c--){d=k||e(c)}k= }]; e=function(){return'\\w+'};
3
2033
by: qianz99 | last post by:
Hi I am not sure what this code does. I have the following questions 1. where is the case? 2. #define TLV_INTEGER(name, octets) p->name = -1; Is it define a function TLV_INTEGER(name, octets) and return a -1? and similar questions on other #define 3. in #define PDU(name, id, fields) \
6
3052
by: sbcs | last post by:
I'm a website developer. Recently I've found variations of this code on the home pages of several of my sites. It triggers warnings in some anti-virus/malware programs but not in others. The pages are on different servers which leads me to believe the code is coming from me somehow. Can anyone tell me what it does? Is it possibly the output of a virus on my machine? If so, why would it appear on the remote version of the page and not my local...
0
8420
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8617
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7353
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
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
4173
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
2743
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
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
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.