[Solved] Lock a listbox with a check box

Creating and using forms
Post Reply
Maax555
Posts: 127
Joined: Tue Mar 28, 2017 11:56 am

[Solved] Lock a listbox with a check box

Post by Maax555 »

Hi, I am trying to figure out the best way to be able to add multiple similar entries in a form.
For example, entering data into the following fields.
Part Number
Description
Customer
Size

So i might have an occasion to add say 10 records one after the other, they would all be different part numbers, different descriptions but the customer and size may be the same.

So for the first entry i add the part number, description and then choose a customer and size from the listbox.
I want to have a checkbox next to customer and size so when checked the form retains the current customer and size (and check box status) for the next record when I press save.

I previously worked this the other way around where i added the Customer, Size and then entered the part numbers into a control table.
This was fine but I could not figure out a way to stop duplicate entries into the control table.
I did hope to replace the control table with another form so I could add a macro to convert entries into uppercase (and use index design for unique field) but failed to progress with that.

Either way the above checkbox would come in useful for other scenarios.

Any help appreciated.
Last edited by Maax555 on Wed Apr 18, 2018 4:49 pm, edited 1 time in total.
Regards Maax
LibreOffice 6.1.4.2 on Windows 7
UnklDonald418
Volunteer
Posts: 1544
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Lock a listbox with a check box

Post by UnklDonald418 »

Look here for a different approach
Base Copy Field or Clone Record - Example
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
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Lock a listbox with a check box

Post by Villeroy »

download/file.php?id=22304 two more record cloners without macros.
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
Maax555
Posts: 127
Joined: Tue Mar 28, 2017 11:56 am

Re: Lock a listbox with a check box

Post by Maax555 »

Brilliant, i will go through these. Many thanks for taking time to share your knowledge, its greatly appreciated.
Regards Maax
LibreOffice 6.1.4.2 on Windows 7
Maax555
Posts: 127
Joined: Tue Mar 28, 2017 11:56 am

Re: Lock a listbox with a check box

Post by Maax555 »

So i have looked at these suggestions and have decided that they are not best suited to my requirements. I think i will revert back to trying to create a form whereby i enter the fields which i want to be used on the next record in one form which then populates a subform which has an additional field or two.
I had something similar working but it used a control table and I could not workout how to stop duplicate entries into the database.
I will mark this as solved as I think the suggestions would work for many people.
Thanks guys.
Regards Maax
LibreOffice 6.1.4.2 on Windows 7
Post Reply