Update text with a string that has a ? - gets truncated

peskywinnets

Registered User.
Local time
Today, 19:40
Joined
Feb 4, 2014
Messages
587
How do I compose the syntax in an update query to avoid a question mark affecting (truncating) the update string?

For example, when I have this as the update text...

Code:
"UK Revise#http://cgi5.ebay.co.uk/ws/eBayISAPI.dll?[COLOR="Red"]UserItemVerification&item="[/COLOR]

...It actually results in the following outcome...

UK Revise#http://cgi5.ebay.co.uk/ws/eBayISAPI.dll (i.e. the red bit following the ? showing in the above update command is missing)

Any ideas?
 
Last edited:
Try using the syntax Nautical Gent suggested in your last thread
Use """ at start and end
 
question marks in themselves do not cause truncation. Can you put this in context - so far as I can see the string is not complete - it needs something after the = sign.

Where did the string come from?
Where is this outcome?
If being used as a url, why have UK Revise #?
 
A bit more meat on the bones.

This is going to be a hyperlink.

I find updating hyperlinks easier if I first convert them to text in access (as then I can see what's going on!)...afterwards I then convert back to a hyperlink(this was a tip I found out about on the web)

here's the actual full text I want to update with (I didn't give this in my opening post, as I thought it would be easier to keep it short!)...

"UK Revise#http://cgi5.ebay.co.uk/ws/eBayISAPI.dll?UserItemVerification&item=" & [EbayListing]]![ItemID] & "&sourcePage=ViewItem"

but like I say when I update, all I get is this (as the outcome for the updated string)...

UK Revise#http://cgi5.ebay.co.uk/ws/eBayISAPI.dll"

So clearly something is happening wrt to the ? embedded in the update string

Try using the syntax Nautical Gent suggested in your last thread
Use """ at start and end

At the start & end of what...the whole string of the question mark part?
 
I meant try replacing " with """ on the bit that gets truncated.

Code:
"""UK Revise#http://cgi5.ebay.co.uk/ws/eBayISAPI.dll?UserItemVerification&item=""" & [EbayListing]]![ItemID] & "&sourcePage=ViewItem"

I'm not saying it will definitely work as I have also used ? in hyperlinks with no problems
Having said that I prefer to use text strings/fields and then code as follows:

Code:
Application.FollowHyperlink "http://cgi5.ebay.co.uk/ws/eBayISAPI.dll?UserItemVerification&item=" & [EbayListing]]![ItemID] & "&sourcePage=ViewItem"

or use a separate string for the last part
Code:
strText="[EbayListing]]![ItemID] & "&sourcePage=ViewItem""
Application.FollowHyperlink "http://cgi5.ebay.co.uk/ws/eBayISAPI.dll?UserItemVerification&item=" & strText
 
Sorted!!

In the end the suspect ? truncation was a misnomer.

What has happened is that when I converted from a hyperlink to a text field, without me knowing, access has decided that the text field length should only be 50 characters! (first time I've had this happen).

I've set it to the max (255) & I can now update fine.

thanks for your input & I'm sorry to have taken up your time.
 
Sorted!!

In the end the suspect ? truncation was a misnomer.

What has happened is that when I converted from a hyperlink to a text field, without me knowing, access has decided that the text field length should only be 50 characters! (first time I've had this happen).

I've set it to the max (255) & I can now update fine.

thanks for your input & I'm sorry to have taken up your time.

The default length for text fields can be set n Access options
 
Thanks,

I've never been hit by this before....I let access create text fields all the time...it usually defaults to 255... it's only here, when I've converted from hyperlink to text have I seen access apply a character count of 50.
 
IIRC the default used to be 255 but in one version of Access (2010?) it was changed to 50 which is now my current default.
 
It could be SQL hang up / hang over - Varchar(50) is pretty much a default for a SQL text field.
 

Users who are viewing this thread

Back
Top Bottom