Added field but how to amend sql

Creating and using forms
Post Reply
zark
Posts: 4
Joined: Wed Jul 26, 2017 3:13 pm

Added field but how to amend sql

Post by zark »

Hi,
this is a basic question, i want to edit the sql of a form however as much as i look i cant find the button to bring up the forms sql
i have searched google and this forum but i must be using incorrect terms and looking for the wrong thing.

its beginning to be farcical

thanks
OpenOffice 4.1.3 on WINDOWS 7, sp1, 64bit
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Added field but how to amend sql

Post by Villeroy »

It's either a table, a query or an SQL statement you have entered.
In the first case the SQL is simply SELECT * FROM "Table"
In the second case you find the SQL in the query definition (edit query in SQL view).
In the third case you would not ask the question.
Base tutorals, links to documentations and examples: viewforum.php?f=83

First hint: View>Toolbars>"Form Design" and "Form Controls". The hit the 5th button on the "Form Design" bar which opens the form navigator.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
zark
Posts: 4
Joined: Wed Jul 26, 2017 3:13 pm

Re: Added field but how to amend sql

Post by zark »

i wish to edit the sql that is attached to a form

*its bizzar, i simply want a field data to goto table a and table b, as it is the field data goes to table a.
OpenOffice 4.1.3 on WINDOWS 7, sp1, 64bit
UnklDonald418
Volunteer
Posts: 1547
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Added field but how to amend sql

Post by UnklDonald418 »

Open your form in the Edit/Design mode.
Go to View->Toolbars and make sure there is a check mark in front of Form Design.
Along the bottom of the screen move the mouse over each icon looking for Form Navigator. Click on that to open the Form Navigator window.
In the Form Navigator window right click on the Form you are wanting to inspect and select Properties from the list of options.
This will open the Form Properties dialog. Click on the Data tab.
The first line is Content type which can be either Table, Query or SQL command.
Table means that the data is supplied directly from the table and there is no editable SQL.
If it says Query then the next line (Content) will tell you the name of the Query being used as the data source. You can find the Query by clicking on Queries on the main database window.
If it shows SQL command then the Content line will show the SQL statement. It can be either edited directly or if you click on the ellipses to the right to open the Query editor.
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
zark
Posts: 4
Joined: Wed Jul 26, 2017 3:13 pm

Re: Added field but how to amend sql

Post by zark »

I now understand what villeroy and unkl are writing....

there is no editable sql... gah! ok, thanks
OpenOffice 4.1.3 on WINDOWS 7, sp1, 64bit
UnklDonald418
Volunteer
Posts: 1547
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Added field but how to amend sql

Post by UnklDonald418 »

As Villeroy noted, if your form has Content type set to Table you can duplicate that by setting Content type to SQL command and use SELECT * FROM "Table" as your starting point.
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
Post Reply