Thanks to iLove SharePoint for creating the “Execute SQL” action.
With it I was able to create a workflow against the add/change event in my document library to create a link to my equipment page based on if there is any information to link to.

I first store my select statement in a variable so I can log it to the history file (this was helpful with debugging the workflow.)

SELECT COUNT(DWG_NAME_) FROM AccessDatabase…[AccessTable] where DWG_NAME_ = ‘[%DocumentLibrary:FileName%].DWG’
Then using the Execute SQL action, I can query the Access Database to see if there is anything I want to link to and store the results in a variable. I can then also show how many items there are in the hyperlink text. (The connection string I used was: Data Source= OFFICESERVER;Initial Catalog=WSS_Content;Integrated Security=SSPI. This particular server uses Studio Express on the same server as SharePoint.)

So if there is something to link to, I create the URL text: Store Helpful text-[%Variable: SQLResult%] in Variable: URLText.
Then I build the URL string: 
And store it in the hyperlink column of my document library. The user will know that only the drawings with links have something in the Access Database to look at:











