Output to Notepad/MsgBox with "Quotations"? (1 Viewer)

DeanRowe

Registered User.
Local time
Today, 03:37
Joined
Jan 26, 2007
Messages
142
Hi,

Here's what I'm trying to achieve:

By Clicking command button "GenerateButton" on the "OurProductsTable" form it outputs the text below to either a msgbox, or ideally a notepad file. [OurProductID] in the text below would be replaced by the field [OurProductID] from the "OurProductsTable" form.

here is the text:

Code:
Please copy and Paste the following code into the products webpage:

<form action='http://www.romancart.com/cart.asp' method="post">
                              <input type="hidden" name="itemcode" value='[OurProductCode]' />
                              <input name="submit" type="submit" value='Add to basket' />
                              <input type="hidden" name="storeid" value='00001' />
                          </form>

I originally tried to output to notepad but gave up in favour of the "easier" msgbox solution - however the "quotation" marks are messing this up and I can't find a way of using an alternative/secondary delimiter to use instead of "quotation" marks.

Any ideas on the best solution? All I need is the text popping up on the screen so the user can cut and paste it into another program.

Thanks for your time.

Dean
 

KeithG

AWF VIP
Local time
Yesterday, 19:37
Joined
Mar 23, 2006
Messages
2,592
You can use chr(32) and it will be converted to a double quote.
 

DeanRowe

Registered User.
Local time
Today, 03:37
Joined
Jan 26, 2007
Messages
142
Hi KeithG,

Thanks for the reply, I've just finished doing it the hard way using """". here's the code incase anyone looks up this thread in future:

Code:
Private Sub Generate_Click()
Me.memo.Value = "Please copy and Paste the following code into the products webpage:" & vbCrLf & "" & vbCrLf & "<form action='http://www.romancart.com/cart.asp' method=" & """" & "post" & """" & ">" & vbCrLf & "            <input type=" & """" & "hidden" & """" & " name=" & """" & "itemcode" & """" & " value='" & [Forms]![Ourproductstable]![OurProductName] & "' />" & vbCrLf & "            <input name=" & """" & "submit" & """" & " type=" & """" & "submit" & """" & " value='Add to basket' />" & vbCrLf & "            <input type=" & """" & "hidden" & """" & " name=" & """" & "storeid" & """" & " value='00001' />" & vbCrLf & "       </form>"
End Sub

I'm pasting it directly into an unbound text box, as it serves the same function to me and the msgbox wouldn't allow to copy the text. If anyone does ever look at this code its easier to read in notepad with wordwrap on.

Cheers for your help keith

Dean
 

Users who are viewing this thread

Top Bottom