Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Access only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Member List
Calendar
Today's Posts
Home
Forum
Topic
Access
What is wrong with this VBA CODE
What is wrong with this VBA CODE
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
steve1d
New Member
Join Date:
Mar 2014
Posts:
1
#1
What is wrong with this VBA CODE
Mar 15 '14, 12:47 PM
What is wrong with the following code :
Code:
If C.SentOn <> "" Then
It keeps erroring. The same code runs perfectly in other modules.
Last edited by
NeoPa
;
Mar 15 '14, 06:57 PM
.
Reason:
Added [CODE] tags punctuation and spelling etc.
Seth Schrock
Recognized Expert
Specialist
Join Date:
Dec 2010
Posts:
2965
#2
Mar 15 '14, 12:55 PM
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
Code:
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.
Comment
Post
Cancel
NeoPa
Recognized Expert
Moderator
MVP
Join Date:
Oct 2006
Posts:
32669
#3
Mar 15 '14, 06:58 PM
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.
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
👍
👎
☕
Comment