Access 2007 - create a field with a space " " in it

oliviar

Board Regular
Joined
Sep 12, 2010
Messages
184
Hi Guys,
I need a column in my table I'm exporting to excel to have a space in it.
In Access the space is there. In Excel, the space is gone. In turns into cells without spaces, but which nevertheless don't count as blank. So far I have done it like this SpaceCol: " "

On a related note, I need a way to make a field with a specific title, but the entire column needs to be blank - REALLY blank. When I do BlankCol: "" it does that annoying blank-but-not-really-blank-in-excel trick.

:confused:

Help appreciated,
thanks
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
1) The the space column should work fine. Are you sure there's a space between the quotes? In what way are you viewing or exporting this to Excel?

2) For blank columns, try BlankCol: Null
But I wouldn't assume Excel will treat this as really really blank. It's data.
 
Upvote 0
Hi Xenou,
The space IS there in Access... but the exportation to Excel seems to remove it.
I even tested it with about 10 spaces, just to check. No matter what, the exportation process removes the spaces, be it 1 space, or 10 spaces. :eeek:
 
Upvote 0
What is the "export process" you are using and what version of Access are you using? Also, what are you actually exporting? Is this a query you are describing?
 
Upvote 0
It appears Access automatically shortens a single space in a field to "" - treating it as an empty string. I didn't know that - it's interesting and I learned something today. However, I would advise not to use single spaces as field contents - it seems to promise many troubles, of which this is only the beginning. You are welcome to describe what you are really trying to do and maybe a better way can be found. I'm pretty sure you'll find few (if any) experienced Access developers using single spaces in fields.

ξ
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,827
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top