Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index

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
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.


To unsubscribe e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.