[libreoffice-users] Re: Macro to open form + pass on value from current form
Am 19.12.2014 um 04:21 schrieb Andrew Douglas Pitonyak: And, when you can solve a problem without a macro, that is generally the better path :-) And for most of the rest we have: http://extensions.libreoffice.org/extension-center/access2base -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Macro to open form + pass on value from current form
And, when you can solve a problem without a macro, that is generally the better path :-) On 12/17/2014 01:02 PM, Andreas Säger wrote: Am 17.12.2014 um 03:05 schrieb Joel Madero: Hi All, I have a form that has bookID as a unique key. I want to have a button that is to open a second form and do the following: (1) search for the bookID in another table (Series); (2) If bookID does not exist in Series, create a new record that has the bookID and open another form and passes the bookID to that form so I can enter the appropriate info. Guidance appreciated. Best, Joel This can be done without macro using stand-alone forms, hyperlink button and a criteria table. 1) [Example #1] Filter/Search with Forms (leveraging SubForms) https://forum.openoffice.org/en/forum/viewtopic.php?f=100t=42845 2) [Tutorial] Standalone Forms / Switchboard: https://forum.openoffice.org/en/forum/viewtopic.php?f=83t=40493 -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.odt Info: http://www.pitonyak.org/oo.php -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Macro to open form + pass on value from current form
Le 17/12/2014 03:05, Joel Madero a écrit : Hi Joel, I have a form that has bookID as a unique key. I want to have a button that is to open a second form and do the following: (1) search for the bookID in another table (Series); (2) If bookID does not exist in Series, create a new record that has the bookID and open another form and passes the bookID to that form so I can enter the appropriate info. My own take on this, as I had something similar setup a long time ago, was to have a button that activated a macro which : - checked whether a value existed in another table via a parameterized query, - if the ID didn't exist, constructed and fired an INSERT statement to insert a new value into that table (either automatically if it was autoincrement, or using a previous last_insert_id() function to query the id counter and add 1 to it to create my new counter value ; - then return the inserted value and display it to the user via a message box. Alternatively, I guess I could've caused a second form to open up after successful completion of the INSERT statement, but that isn't what I needed. Not quite sure why you need to open a whole set of other forms though, as the value you obtain for BookID could be inserted programmatically without going through forced UI steps (unless that is what you want for some particular reason) Alex -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Macro to open form + pass on value from current form
On 12/17/2014 08:52 AM, Alexander Thurgood wrote: My own take on this, as I had something similar setup a long time ago, was to have a button that activated a macro which : - checked whether a value existed in another table via a parameterized query, Do you have an example of how to do this? The online documentation is quite scarce for base :-/ - if the ID didn't exist, constructed and fired an INSERT statement to insert a new value into that table (either automatically if it was autoincrement, or using a previous last_insert_id() function to query the id counter and add 1 to it to create my new counter value ; - then return the inserted value and display it to the user via a message box. Alternatively, I guess I could've caused a second form to open up after successful completion of the INSERT statement, but that isn't what I needed. Not quite sure why you need to open a whole set of other forms though, as the value you obtain for BookID could be inserted programmatically without going through forced UI steps (unless that is what you want for some particular reason) Well the button is basically Book is Part of Series - this opens a new form Series which allows me to then either select a series that's already entered, or if it's a new series that I'm just starting, allows me to create a new series entry and attaches the bookID to that series. Thanks Alex - been told you're one of the go to heroes in the db community. I appreciate the help as this is all somewhat new to me. Best, Joel -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Macro to open form + pass on value from current form
Le 17/12/2014 18:07, Joel Madero a écrit : Hi Joel, - checked whether a value existed in another table via a parameterized query, Do you have an example of how to do this? The online documentation is quite scarce for base :-/ Unfortunately, this was in a previous life of mine, and I didn't get to keep the code or the ODB file :-/ I can only suggest the following that might help you further : - Robert Grosskopf's Guide to Base (this is currently the documentation projects official Base Guide / Handbook) - ther emight well be something in there for you - Roberto Benitez' book on using OOBasic for programming Base for OpenOffice.org ; - Andrew Pitonyak's experiences of using Basic with Base in his PDF book. Also, I'm pretty certain that the kind of question you're asking has been posted on the OpenOffice.org forum - there are some very capable db people over there, that have cried tears of sweat and blood over Base in the past, and continue to do so today, offering help to the lonely, needy, and lost ;-) Well the button is basically Book is Part of Series - this opens a new form Series which allows me to then either select a series that's already entered, or if it's a new series that I'm just starting, allows me to create a new series entry and attaches the bookID to that series. Ah, OK, I understand a bit better now. Definitely read through the Base Handbook / Guide, and especially Robert's Media database ODB file. Additionally, I really would suggest a trawl through the OOo forum. Personally, I'm kind of moving away from LO Base as a front end - for me, it needs to behave reliably over even minor version changes, and experience has shown that, unfortunately, the fast pace of code change in the LO project doesn't allow that to be the case. Good luck, Alex -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Macro to open form + pass on value from current form
Am 17.12.2014 um 03:05 schrieb Joel Madero: Hi All, I have a form that has bookID as a unique key. I want to have a button that is to open a second form and do the following: (1) search for the bookID in another table (Series); (2) If bookID does not exist in Series, create a new record that has the bookID and open another form and passes the bookID to that form so I can enter the appropriate info. Guidance appreciated. Best, Joel This can be done without macro using stand-alone forms, hyperlink button and a criteria table. 1) [Example #1] Filter/Search with Forms (leveraging SubForms) https://forum.openoffice.org/en/forum/viewtopic.php?f=100t=42845 2) [Tutorial] Standalone Forms / Switchboard: https://forum.openoffice.org/en/forum/viewtopic.php?f=83t=40493 -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted