Web Link

Creating and using forms

Web Link

Postby danmichsr » Wed Nov 08, 2017 4:08 am

OpenOffice 4.1.4 (Windows 10)
OpenOffice Base Question:
I have set up a field in my TABLE as "Find A Grave" With FIELD TYPE [ VARCHAR ]
I have created a Form for that Table and included "Find A Grave" on that Form.
I have gone to the web page that I want and copied the full txt to clip board.
Each entry on my table will have a different web address.
Not sure if the address goes on the Table or on the form or both.

:knock:

Been trying for two days and there must be a simple thing to do this.
I've only been at it for two days also but find the program exceptional.
I've tried using Hyper Link and am doing something wrong....

Thanks in advance

Dan :?
OpenOffice 4.1.4
Windows 10
danmichsr
 
Posts: 2
Joined: Wed Nov 08, 2017 3:48 am

Re: Web Link

Postby UnklDonald418 » Sun Nov 12, 2017 4:47 am

Base forms are used to enter data into Base tables. While you can enter data directly into tables, forms can make that entry process more user friendly.

It is not clear what you want to do.
Do you want to save the address of the web page in your database so that you can access the page, or are wanting to save the actual content of the web page?

Hyperlinks don't work the same in Base as they do in Writer or Calc.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.6 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1150
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Web Link

Postby danmichsr » Sun Nov 12, 2017 5:23 am

I have a field in my Table with a web link address. Each record will have a different web address. But some might be empty.

I have created a form and would like to add that field and have it activated if I push a button. And have it go to that web address on my browser. Thanks
OpenOffice 4.1.4
Windows 10
danmichsr
 
Posts: 2
Joined: Wed Nov 08, 2017 3:48 am

Re: Web Link

Postby UnklDonald418 » Sun Nov 12, 2017 6:33 am

Base doesn't directly support hyperlinks from table fields so you must use a workaround.
Open your form in the Edit/Design mode. If you don't have a button control on your form add one, then right click on the button and select Control from the pop up menu.
A Properties: Push Button dialog should appear.
On the General tab of the dialog scroll down to the Action property
Select Open document/web page from the list of options for this property.
On the line below is the URL property. You could enter a web address on that line so that each time the button is pressed your default browser would open that web address.
The problem with that approach is that you would need a button for each web address in your database.
The solution to that problem requires a macro to copy the web address from the Text Box control containing on your selected web address into the URL field of the button.
However, the macro would need to know some details of the structure of your form.

If you could upload a sample of your database someone here could probably set up a macro for you.
If you are comfortable with entering a macro yourself, we still might be able to help if were to upload a screen shot of the Form Navigator pane.
Are you familiar with the Form Navigator? It is on the Form Design toolbar usually found along the bottom of the screen.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.6 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1150
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Web Link

Postby dreamquartz » Sun Nov 12, 2017 7:27 am

Hi danmischr,

It looks similar to an issue I had in the past.
You might want to look at https://forum.openoffice.org/en/forum/viewtopic.php?f=13&t=81869&hilit=urlbutton

Dream
LO 6.x and OO 4.x on Windows 7 PRO & Ubuntu 18.04 LTS.
dreamquartz
 
Posts: 684
Joined: Mon May 30, 2011 4:02 am

Re: Web Link

Postby Nocton » Mon Nov 13, 2017 4:25 pm

Put a text box (txtWebSite) or other control on your form to hold the web address and a command button to call up the web site. Set the button's action to 'Open document/web page and the code below to the event 'Approve action'

This is the code I use, which originally came from support on this forum:
Code: Select all   Expand viewCollapse view
Function openurl(oEv as object)
' to open URL in browser
Dim oForm,oTextBox
oForm=oEv.source.model.parent
oTextBox=oForm.getbyname("txtWebSite")
oEv.source.model.targeturl=oTextBox.text
openurl=true
End Function
OpenOffice 4.2.0 on Windows 10
Nocton
Volunteer
 
Posts: 501
Joined: Fri Nov 05, 2010 10:27 am
Location: UK


Return to Forms

Who is online

Users browsing this forum: RPG and 3 guests