Subform in new form

Creating and using forms

Subform in new form

Postby mihmih » Tue Nov 29, 2016 4:12 pm

Hi,

i have a table (mainForm) and i want to add to some record another linked records just like in a form with subform. But i want to have this subform-table (adding, modify and delete records) in another form and open it by a button. Is maybe some simple macro to do that? I can not find any topic about it.... Thank you for any help.
LibreOffice 4.2 on Windows7
mihmih
 
Posts: 107
Joined: Wed Feb 18, 2015 9:21 pm

Re: subform in new form

Postby Villeroy » Tue Nov 29, 2016 4:47 pm

Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28675
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: subform in new form

Postby mihmih » Tue Nov 29, 2016 5:01 pm

it is a simple open any form-macro if i understand...

i have 3 tables:

orders(id_o, orders_date)
junction_table(ID_j, ID_order, ID_product)
products (ID_prod, name, price)

and in form with table orders FOCUS is in one record. And i want to push a button and open a form, where i can add products to this order ( add data to junction_table without telling to the base any information about ID_order, just like in Mainform-subform in one FORM). Is it possible?
LibreOffice 4.2 on Windows7
mihmih
 
Posts: 107
Joined: Wed Feb 18, 2015 9:21 pm

Re: subform in new form

Postby Villeroy » Tue Nov 29, 2016 5:04 pm

It is impossible if you do not understand the solution in http://www.access2base.com/access2base.html (under Actions > Open Form)
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28675
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: subform in new form

Postby Villeroy » Tue Nov 29, 2016 5:14 pm

Access2Base is a macro suite written in Basic and distributed as an extension. Install the extension and make use of hundreds of wrapper functions.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28675
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: subform in new form

Postby mihmih » Tue Nov 29, 2016 5:15 pm

IS it so simple?


OpenForm(Addingproducts, , , ID_o = ID_order, , , )
LibreOffice 4.2 on Windows7
mihmih
 
Posts: 107
Joined: Wed Feb 18, 2015 9:21 pm

Re: subform in new form

Postby Villeroy » Tue Nov 29, 2016 5:45 pm

I don't know. I hardly use any database macros. Of course you need to be familiar with the Basic language.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28675
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: subform in new form

Postby UnklDonald418 » Tue Nov 29, 2016 6:37 pm

Perhaps this link may help you.
https://forum.openoffice.org/en/forum/viewtopic.php?f=39&t=82622&p=382917&hilit=open+close+form#p382917
Despite the misleading title for the topic, there is a macro to open (and close) a form using a button click.
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: 1337
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: subform in new form

Postby UnklDonald418 » Tue Nov 29, 2016 7:26 pm

and in form with table orders FOCUS is in one record. And i want to push a button and open a form, where i can add products to this order ( add data to junction_table without telling to the base any information about ID_order, just like in Mainform-subform in one FORM). Is it possible?

You might be able to accomplish this using a filter form.
The first form can store the MainForm ID of "one record" in the filter table which can then be read by the second form.
The Filter table would probably only need two fields. You can execute the following SQL command to create the table
Code: Select all   Expand viewCollapse view
CREATE TABLE "FilterTable" ( "FilterID" BOOLEAN PRIMARY KEY, "MainFormID" INTEGER);

Before using it you should probably open "FilterTable" and make sure the checkbox is checked.
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: 1337
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: subform in new form

Postby UnklDonald418 » Tue Nov 29, 2016 8:16 pm

Also have you looked at this tutorial
https://forum.openoffice.org/en/forum/viewtopic.php?f=100&t=56006
in particular the database Invoice_Forms_v2.odb
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: 1337
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 1 guest