Problem with a look-up in a subform

Here are my relations

I have a form for tbl-Designs. On that I have a sub-form for tbl-published.
I have Product as a listbox looking up from tbl-ProductList and that works well.
I then have a listbox for Website looking up from tbl-WebsiteList, however, it does not show the list.

The form:

Have a look: https://www.mediafire.com/file/b4p5155c1y8bhoq/Headshots.zip/file
This is a Base document with a HSQLDB embedded.
The picture names are stored in a separate table linked through a 1-to-1 relation (one or zero pics for each person). For simplicity, the pics are stored in the same directory, so you don’t need to fiddle with any paths.
The picture control belongs to a subform, linking the pictures to the parent form by the common person ID. A double-click on the picture control opens a file picker dialog to add a new image record (if there is no picture record) or modify an existing image if the person ID points to an existing record. After picking a table, the save button saves the new/modified record. The cancel button discards the record. The delete button deletes an existing picture record from the pictures table.

Thank you but I fail to see how that will help my solution.

I fail to see how to help without a document.

Blockquote I fail to see how to help without a document.

Obviously I am unable to send the database as it contains private information within it.

What would you actually need?

IF (and only if) you have a database embedded in the Base document:

  1. Make a copy of the document.
  2. X all strings.
UPDATE "table" set "text column" = 'X'

or simply delete the text columns where they are not involved in relations.
ALTER TABLE "table" DROP COLUMN "text column"
What remains is dates and numbers without context.

Main form with list of design titles
|-> Subform with list of published designs
|-> Subform with list of images
|-----> Sub-subform with selected image
|-----> Sub-subform with details of selected product
|-----> Sub-subform with website

No, the form wizard hardly creates any useful forms.

ask117245.odb (22.5 KB)

Thank you for your help.

I’m guessing something might be wrong with the table, but I redid the database and it still doesn’t like listing the websites.

Would be grateful if you could take a look. https://www.mediafire.com/file/emwz7bwudcbvcs3/Products2.odb/file

I also find that LibreOffice crashes a fair bit whilst I’m working on it. I’m using the latest version

That’s “normal” while editing a form in design mode. Everything will be stable when using the finished form.

Unlikely. Open the form for editing. Menu:Form>Form Navigator shows a dockable window with the hierarchy of forms, subforms and form controls.

Look at my website query and, form with the website listbox and the subform with the editable website.

A bit worrying that it’s “normal” to crash while in design mode, and extremely frustrating!

Look at my website query and, form with the website listbox and the subform with the editable website.

I did and tbh I couldn’t really see that it would be any different to my listbox. If you have the time, please take a look at the database I uploaded. For the life of me I can not see what the problem is.

I’ve already spent weeks on this and it’s so frustrating. I cannot see why the products listbox works but the website listbox doesn’t. I’m obviously missing something

Thanks

Simply remove the value of the listbox’s “Bound field” property and the website listbox will work with its textual primary key.
Generally speaking, it is a bad idea to use a name as a primary key in your single-column list of websites. A primary key should be some meaningless row number. In order to enforce unique names, you may add a unique index using the index designer in the table’s edit mode.
If you look at my listbox queries, each of them lists some database item with the name in the first column and the primary key in the second column. You select a descriptive name from the listbox in order to write its corresponding ID into this form’s foreign key field.
Listbox properties:
Linked field: the field where the lisbox writes to. Usually, this is a foreign key pointing to a unique item in another table’s primary key.
Source type: I never use “Table”, even if name and primary key happen to be in the right order. “Query” refers to a query name. You may also use the select statement directly with source type “SQL”.
Source: either the name of a query or the select statement.
Input required: If no, there is an empty entry on top of the listbox content.
Bound field: Default is 1. Unfortunately, 1 refers to the second field and zero is not accepted as a reference to the first field. Simply delete the “Bound field” value, and it will refer to the first field. Alternatively, use 2 equivalent fields as in SELECT "Name", "Name"FROM “Table” ORDER BY “Name”.

1 Like

Thank you! I have now got it working!
Have to say the Bound Field was definitely confusing! I used to use MSAccess which was much easier for me, and more stable without crashes! Unfortunately, when I got a new computer my serial number wouldn’t work and MS just said, tough you gotta by the latest version.

Thanks once again for your help and patience - much appreciated.