Added field but how to amend sql

Creating and using forms

Added field but how to amend sql

Postby zark » Wed Jul 26, 2017 3:18 pm

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
zark
 
Posts: 4
Joined: Wed Jul 26, 2017 3:13 pm

Re: Added field but how to amend sql

Postby Villeroy » Wed Jul 26, 2017 4:45 pm

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: https://forum.openoffice.org/en/forum/v ... m.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 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 24657
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Added field but how to amend sql

Postby zark » Wed Jul 26, 2017 4:49 pm

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
zark
 
Posts: 4
Joined: Wed Jul 26, 2017 3:13 pm

Re: Added field but how to amend sql

Postby UnklDonald418 » Wed Jul 26, 2017 9:59 pm

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 subject line
Apache OpenOffice 4.1.4 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 589
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Added field but how to amend sql

Postby zark » Thu Jul 27, 2017 8:30 am

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
zark
 
Posts: 4
Joined: Wed Jul 26, 2017 3:13 pm

Re: Added field but how to amend sql

Postby UnklDonald418 » Thu Jul 27, 2017 3:41 pm

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 subject line
Apache OpenOffice 4.1.4 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 589
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA


Return to Forms

Who is online

Users browsing this forum: No registered users and 6 guests