strPath = """\\Server1\Docs\" & Me.Ref & Me.Customer1Surname & """"
or
strPath = Chr$(34) & "\\Server1\Docs\" & Me.Ref & Me.Customer1Surname &
Chr$(34)
(Watch for word-wrap: the second alternative is also supposed to be on one
line. And just to be explicit, in the first alternative, that's 3 double
quotes at the beginning, and 4 double quotes at the end.)
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"CW" <(E-Mail Removed)> wrote in message
news:A043812F-F562-473E-A90A-(E-Mail Removed)...
>I have created a command button on our forms that creates (on first click)
> and then subsequently (on later clicks) takes us into a folder on the
> server
> where we can save and then access various documents associated with our
> transactions.
>
> At present the new folder name consists of the job Ref and the customer's
> Surname. So a typical folder would be named ....\70301Smith.
>
> The line that deals with this is:
> strPath = "\\Server1\Docs\" & Me.Ref & Me.Customer1Surname
>
> This is OK and working fine except that we would like to have a space
> between the Ref and the Surname, i.e. \70301 Smith, as the name is then
> easier to see at glance.
>
> But I can't work out how to force a space, i.e. how the last bit of the
> strPath code should be written. I have tried a space, a hyphen, an
> underscore, and VB doesn't like any of those.
>
> No doubt this is another of those "easy when you know how" issues ...
> please
> let me into the secret!
> Many thanks
> CW
>