UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Empty Field That's Not Really Empty, Office 2003    
 
   
littlethief
post Mar 3 2012, 09:40 PM
Post #1

UtterAccess Member
Posts: 48



Hello -

I have a field that looks empty but it's not. If you use Len(), it has a value of 4. And I know it's not 4 spaces. Is there a way I can tell what type of character is in there so I can create another field to match up to it?

Thank you!!
Go to the top of the page
 
+
Doug Steele
post Mar 3 2012, 09:42 PM
Post #2

UtterAccess VIP
Posts: 17,613
From: Don Mills, ON (Canada)



Use the Asc to find out the Ascii value of each character:

Format(Asc(Mid([NameOfField], 1, 1), "000") & "_" & Format(Asc(Mid([NameOfField], 2, 1), "000") & "_" & Format(Asc(Mid([NameOfField], 3, 1), "000") & "_" & Format(Asc(Mid([NameOfField], 4, 1), "000")
Go to the top of the page
 
+
littlethief
post Mar 3 2012, 10:07 PM
Post #3

UtterAccess Member
Posts: 48



Thank you, Doug. I got the following result:

032_032_032_032

My next question is, how do I create a field like that? Should I post that in the Query forum?

Thanks!
Go to the top of the page
 
+
tina t
post Mar 3 2012, 11:16 PM
Post #4

UtterAccess Ruler
Posts: 1,812
From: SoCal, USA



QUOTE
QUOTE
I have a field that looks empty but it's not. If you use Len(), it has a value of 4. And I know it's not 4 spaces. Is there a way I can tell what type of character is in there so I can create another field to match up to it?

Thank you, Doug. I got the following result

032_032_032_032

Visual Basic Help in A2003 has a table "Character Set (0 – 127)". Character code 32 is listed as [space] in that table. my guess is that data is being written to that field programmatically, perhaps from an outside source? or via an Append query, perhaps one that has a calculated field where the calculation may return spaces only.

hth
tina
Go to the top of the page
 
+
gemmathehusky
post Mar 4 2012, 12:12 PM
Post #5

UtterAccess VIP
Posts: 1,875
From: UK



char 32 is a space, so the field does appear to contain 4 spaces.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 19th May 2013 - 10:38 PM