Web Link

Creating and using forms
Post Reply
danmichsr
Posts: 2
Joined: Wed Nov 08, 2017 3:48 am

Web Link

Post by danmichsr »

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
UnklDonald418
Volunteer
Posts: 1544
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Web Link

Post by UnklDonald418 »

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.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
danmichsr
Posts: 2
Joined: Wed Nov 08, 2017 3:48 am

Re: Web Link

Post by danmichsr »

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
UnklDonald418
Volunteer
Posts: 1544
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Web Link

Post by UnklDonald418 »

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.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
dreamquartz
Posts: 881
Joined: Mon May 30, 2011 4:02 am

Re: Web Link

Post by dreamquartz »

Hi danmischr,

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

Dream
LO 7.x, HSQLDB 2.7.x & Ubuntu 22.04 LTS.
Nocton
Volunteer
Posts: 533
Joined: Fri Nov 05, 2010 10:27 am
Location: UK

Re: Web Link

Post by Nocton »

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

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.1.12 on Windows 10
Post Reply