Dlookup of string returns with # on either side

bentheimmigrant

Lost & confused
Local time
Today, 06:28
Joined
Aug 21, 2015
Messages
60
Hi...

I've got a string (a file path) which I call up using a Dlookup. It all works fine, except there's a "#" on either side. This seems to only happen sometimes. It's definitely not there when you view the database directly. I've also compacted and repaired the backend.

Any ideas/experience with this in the past?

TIA.
 
Does it happen if the string path looks like a date by any chance?
Try surrounding the result with CStr()
 
I don't think you could describe it as looking like a date... It's a file path, so it's something like "Y:\00 Business\Client Name". It's clearly a string (and the field type is short text).

Can't insert a date into the table right now to test, but what would that tell me?

For the minute, I've used Replace to put in "" for "#". Which should be fine as file paths shouldn't be running around with a "#" in them anyway. Mostly I'm concerned that there's something more deeply wrong somewhere.

Thanks.
 
Does sound a bit odd.
Maybe you could run a query doing the same as the DLookup, and see if you get the same text being returned?
 
The fielf maybe or for sure a hyperlink field.
 
Hyperlink fields can be a little troublesome as Access tends to adjust the text for it's own purposes.

Adding # is one of the side effects.
 

Users who are viewing this thread

Back
Top Bottom