troubleshooting Question

VB Code for Command Button to click on Hyperlink in Table

Avatar of gettechnical
gettechnical asked on
Microsoft AccessVisual Basic Classic
7 Comments2 Solutions538 ViewsLast Modified:
Hello Experts!
I am reconfiguring an Access 2007 database to remove macro commands and use Visual Basic code.  I've been able to do so with all other controls in my Form save one (with the help of your site).  My abilities in Visual Basic are very rudimentary so I need your expertise.  I'm hoping I can explain this in a manner that it makes sense.

I would like to write VB code for a command button in a Form so that when the user clicks on the button, it opens an external PDF unique to each record.  My thoughts were that I should create a hyperlink field in the Table to link to the PDFs folder for each record.  Then to create VB code in the command button's OnClick Event Procedure in the Form that jumps to the Table's hyperlink field of that same record to open each unique PDF.

Here are the variables:
Form Name = F_AR_Entry
Form's Command Button Name: View_Doc1
Table Name = T_DocList
Table's Field Name where Hyperlink to PDF is Stored = View_Doc
Record ID# Used in Attachments: E003
Name of Folder Where PDFs are Stored: 03.12.09 MBJR TEST
PDF File Name: E003.pdf

I'm a beginner - so I don't have any code to add since I don't know where to start w/ this.  I've attached snapshot screens that will hopefully illustrate what I'm trying to do.

I appreciate your help!
Planning & Analytics Manager

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros