Access VBA to Create Variable URL Link Button with Field Value - ms-access

I have hunted around but can only find Excel references that dont apply...
I am trying to create a button hyperlink with a variable element at the end which is the value inside a field on a form.
The code I have so far is...
Shell "explorer " & Chr(34) & "https://store-571ygribq9.mybigcommerce.com/admin/index.php?ToDo=printOrderInvoice&orderId=2524" & Chr(34)
This code works perfectly and there is no authentication issues when it opens the webpage.
The Number 2524 at the end of the url is the part that will change based on the value inside a form field or combo or something like that.
I am about 2 weeks into MS Access so be gentle with me.
I would massively appreciate some help with this as its driving me bonkers now. I can't get any google solution to work.

You should just be able to concatenate the required value into the code instead of the fixed value:
Shell "explorer " & Chr(34) & "https://store-571ygribq9.mybigcommerce.com/admin/index.php?ToDo=printOrderInvoice&orderId=" & Me!cboDataField & Chr(34)

Related

Reserved keyword in Vimeo (ampersand echo)

We noticed an issue when trying to upload a video to Vimeo with the name "Feedback & Echo Chambers". It won't let us.
It won't even save if I change it directly through vimeo.com, without letting me know why.
I narrowed it down to the "& echo" combination. I'm pretty sure it triggers an error on Vimeo side and doesn't allow saving.
I couldn't find any documentation on this, or maybe other character combinations. Anyone have a solution/documentation for this?
For now I am sticking to replacing " & echo" with " and echo".

Hyperlink doesn't display in an Outlook 2016 with HTML

I have a macro with Excel VBA that sends an Outlook 2016 email. Several columns in the data source are used to fill several variables. One of the variables (MyWedAdd) is a web site. The website is different for each line in the data source.
In the body of the email, I need to display the hyperlink to the particular website. The macro works well and sends the Outlook messages exactly like I expect it to; with one little glitch.
The website is not being displayed in the body of the email. It is blank. Following is the line of code I'm using to display the website. I'm fairly certain I have the syntax messed up or the hyperlink to the web site would be displayed
"You may pay online at <a href=" & MyWebAdd & "</a> . Check or money order payments can also be used."
I haven't used HTML very much so this is part of the learning curve for me. Any suggestions or advice to make this work would be greatly appreciated. Thanks for your help. Stay safe....Shaves
You have the syntax wrong. It must be
"You may pay online at " & MyWebAdd & " . Check or money order payments can also be used."

How to get hyperlinks dynamically in Microsoft Access Reports?

In a MS Access Report, I am trying to create a hyperlink that would take a user webpage. The URL is dependent on a data field in my database.
In my report, I have added the hyperlink control and used the popup to enter the hyperlink.
When I use the Hyperlink Builder, to dynamically set the value of one of the parameters, I get a garbage url that does not work. The URL that is returned is :
file:///C|/Users/gh/Dropbox%20(Bar01%20College)/BW%20Demo%20Project/="https://baruch.az1.qualtrics.com/jfe/form/SV_8uZm3rAnSWPE9gN?DocumentID="
& [documentID] & "&TransmittedScore=ENG_2100"
The expected result would be to have the URL that is customized based on the record where my parameter DocumentID would be equal to the value of my documentID field.
https://baruch.az1.qualtrics.com/jfe/form/SV_8uZm3rAnSWPE9gN?DocumentID=ZuluTest&TransmittedScore=ENG_2100
If I paste the expected URL into the address field, the URL parses properly:
The requirement of this project is that the links need to be clickable when exported to PDF.
Note: I have previously posted this question to https://www.utteraccess.com/forum/index.php?showtopic=2057701 and looking for additional assistance.
Working with TheDBGuy on the UtterAccess forum (URL in my original question). The solution that came up was to use an UNBOUND Text Box, setting the property of Is Hyperlink = Yes.
Then in the ControlSource property, built the URL string in the format of ="<DISPLAY TEXT>#URL"
So the value would have been:
="ENG 2100#https://baruch.az1.qualtrics.com/jfe/form/SV_8uZm3rAnSWPE9gN?DocumentID="& [documentID] & "&TransmittedScore=ENG_2100"

Copy/paste HTML table with colspan to Excel?

EDIT: On OSX, copy/paste works perfectly from Firefox, but not from Chrome or Safari
Is it possible to copy table cells with colspan to Excel that reflects the structure?
Would like an app to render tables in HTML such that a user can copy/paste it to Excel reasonably well. In particular, would like some table cells with colspan=# to copy to Excel with correct alignment.
The problem is that Excel seems to ignore colspan in copy/paste. Thus in the example below the column title "Size" appears too far to the left, over the column for "Yellow" when it should appear over the column for "small"
I don't particularly care if the Excel cell is "merged", "centered across selection" or just plain separate cells. They key thing is to have the position be semantically correct.
HTML5 okay as well as any hack
CodePen: http://codepen.io/gradualstudent/pen/MYwNpY
HTML table as rendered in browser:
Table after copy/paste to Excel:
The Clipboard handling differ in different browsers. Whether Excel can get a table from the clipboard in the correct format depends on which data have the different browsers put in the clipboard. Unfortunately the most actual operating systems comes not more with a clipboard viewer per default. So we cannot simply look there what the differences are.
But Excel can deal with HTML tables. And so if HTML source code of a HTML table is in the clipboard, then Excel can paste this properly.
Example with VBA:
Sub HTMLinClipboardTest()
sHTML = "<table>" & _
"<tr><td colspan=""2"" align=""center"">colspan2</td></tr>" & _
"<tr><td rowspan=""2"" style=""vertical-align:middle;"">rowspan2</td><td>default</td></tr>" & _
"<tr><td>default</td></tr>" & _
"<tr><td>default</td><td>default</td></tr>" & _
"</table>"
Dim oDataObject As New DataObject 'needs Microsoft Forms 2.0 Object Library
oDataObject.SetText sHTML
oDataObject.PutInClipboard
ActiveSheet.Range("a1").Select
ActiveSheet.Paste
End Sub

Call cells into text boxes in ms-access

I have multiple company's with different web sites and contact numbers.
I want to have a test box say something like this.
"Call us at =[comp_number] ! We are open ....blah, or Visit our web site =[website] to signup for our automatic payment options. "
I am not having any luck finding any information on this.
="Call us at " & [comp_number] & "!"