Using the Web Browser Control in a form (1 Viewer)

LanHua

Registered User.
Local time
Today, 13:21
Joined
Feb 19, 2016
Messages
15
Good afternoon everyone,
I am hoping someone can help with a little issue/query I have.

I have created a database for CRM purposes and it contains info about our customers and a quote log.
Once customer details have been added (via a form) and a quote number has been assigned then a mail merge (to word) is done with the quote template/details.

My query is this, once the word document has been created and saved on our server, is there a way that we can utilise the web browser control in a form to add a hyperlink to the word document saved on our server so this can be viewed when needed? Can the end user do this in form view without using design mode?

Thanks
 

Minty

AWF VIP
Local time
Today, 21:21
Joined
Jul 26, 2013
Messages
10,366
You don't need the web browser control. If you have the document path stored you can display either it or simply the document name and use application.followhyperlink to open it directly.
 

LanHua

Registered User.
Local time
Today, 13:21
Joined
Feb 19, 2016
Messages
15
So can the end user add a hyperlink to a form without going into design mode?
 

Minty

AWF VIP
Local time
Today, 21:21
Joined
Jul 26, 2013
Messages
10,366
Assuming you know the path and the document filename, you can create one from that data. Alternatively your user could create and store one in a field.
 

LanHua

Registered User.
Local time
Today, 13:21
Joined
Feb 19, 2016
Messages
15
Ok, thanks.
So how would I go about setting it up for the user to add a link?
Would the user type in the path to a text box? Or a bound object box?
Could more than one link be displayed in the same box?
Is there a way to enable users to click a 'browse' button and find the file on the server and click to link? (I am trying to make it as easy as possible for the end user so there is more of a chance that they will use it!)
Thanks
 

LanHua

Registered User.
Local time
Today, 13:21
Joined
Feb 19, 2016
Messages
15
That code was exactly what I was looking for. Thanks
 

LanHua

Registered User.
Local time
Today, 13:21
Joined
Feb 19, 2016
Messages
15
I have the code working but I have a few questions about it,

1) I put the Event Procedure in the 'OnDoubleClick' in the event tab but the results disappear when I close the form and open it up again - how do I prevent this?
2) Only one hyperlink can be shown in the text box at one time, is there a way I can get more than one hyperlink to show?
Many thanks for your help.
 

Minty

AWF VIP
Local time
Today, 21:21
Joined
Jul 26, 2013
Messages
10,366
If you want more than one item to be able to be selected you would normally populate a listbox with the links and then let the user select one from the list.
 

LanHua

Registered User.
Local time
Today, 13:21
Joined
Feb 19, 2016
Messages
15
Ah, then in that case it may not be what I am looking for.

I want end users to be able to easily add multiple hyperlinks to documents that relate to information on a form.

I would prefer to use a 'browse to file' box to make this easier for the end user. It also has to be hyperlinks so that if the document is edited then it is the same document if accessed via the database or directly from the server. And it would have to have the capacity for multiple hyperlinks because as well as the quote there may be supporting documentation that needs to be accessed too.
 

Minty

AWF VIP
Local time
Today, 21:21
Joined
Jul 26, 2013
Messages
10,366
You can have a list box with all the file types in it, and double clicking that document will open it - they don't need to be hyperlinked to. We use a similar system to track messages, excel files and pdf's for quotes. The list box is populated by looking in the file location specific for each quote, on the current event of the quote listing.

So we have active quotes in list on a sub form on the left, the Current status and headline fields on the right along with the file list box. Everything in one simple form.
 

LanHua

Registered User.
Local time
Today, 13:21
Joined
Feb 19, 2016
Messages
15
Thank you for that, I will have a look to see if it is something that will work for us.
Thanks again.
 

Users who are viewing this thread

Top Bottom