Making form that handles relationships in base - libreoffice

I have a simple database (made just for practice) with a number of tables. It's supposed to be a "Library usage database", with tables for books, lenders, cities etc.
For instance, the table "Lenders" is a table with..well.. people loaning books from the library. It has among other things a column "City" which is a Foreign Key (right?) that references to the table of Cities.
Now, I would like a form to add lenders. However, for "cities" I would like a control/ list box/ drop down box that displays the cities already entered (displayed by name). When I select a city in that list, the corresponding ID-number is set in the "Lenders" table.
Is there a (fairly) simple way to do this. I've experimented with subforms and list boxes, but not quite found a way to do this.

Related

about tables relationships in ms access and forms

I have a relational database in access, but I have issues joining tables (first time doing a relational database). I did three queries: on first I got costumers and orders information, on second one I got products and quantities. On third one, I got issues information based in first and second queries with some issues table fields.
Then I did a form with query costumer data and a subform with products information (quantities) and I need a issue form. I added a yes/no field from issues table, and when I tick it in subform, I want to be displayed a issues form to type data issues for each record.
The best I could do was joining "identifier" from "incidencias" table to "identifier" to "pedidos" table. I got what I wanted, but I got the issues form fields locked and greyedo out when I tried to entry data, maybe because I did forms based just in queries (I read that searching in google). when I did the form based only in tables, I got serveral errors and the same field information for all records.

Unique form with many tables

I'm trying to create a form to fill three tables to describe some projects with the 'Title of the project' as common field. When I create the form I have to write the title three times, otherwise it's not posible to fill the tables. Is there any way to put just one of the three fields on the form but the three of them are filled?
The database is empty, I want to make a form to start introducing all the projects that are going to be done in my group of work. In one table there are data related to the project, like start dat , full budget etc. In another one the information about my company, like the group its doing it, its role etc. In the last one just some general information like related tags. The name of the project appears in all of them, but when I do the form from a query they seem not to be related even if I do it on the query.
I've already tried to do it with the Wizard tool, selecting the different tables and its fields. I also tried to check the form properties...but I can't come up with what I'm doing wrong...
I'm new using access...

MS Access link record from forms

There are two tables, one for Student and one for Borrowed Books. In the Microsoft Access (2010, 2013), it is easy to display a form Student based on the table Student, and other form BorrowedBooks based on the table Borrowed Books with their Record Source pointed.
How to do Form BorrowedBooks showing records for the current student showing on the Form Student one at one time? I'm looking to learn both VBA script and using the built-in controls to achieve the result.
Relationship between has been built. And it's one student to many books relationship.
One VBA approach like:
DoCmd.OpenForm "BorrowedBooks", , , "StudentID = " & Me.StudentID
The real trick is figuring out which event to put code into.
Another option is to use form/subform arrangement - main form bound to Students table and subform bound to BorrowedBooks. Have you looked at Microsoft Lending Library database template?
so if my understanding of your question is clear then you need to join operation on the tables
SELECT *
FROM
student
INNER JOIN borrowedbooks ON (The two table'S related column ie student.pk=borrowedbooks.fk)
you can also add a where clause if you want from here you can state you primary key in student table and it relationshi

Access 2010 - Parent and child forms share the same table

I'm writing a budget database, and while planning out the tables went fine, forms are proving to be trickier.
I have a 'transactions' table, and two queries based off it. The tables and column names are below
'people_to_reimburse' : payee_name, total
'unwritten_checks' : payee_name, amount, description, date_incurred
I'd like to make a form where you can go through the people to reimburse, and there's a subform showing which checks are theirs. Obviously, the payee_name would be the field to link on.
However, in Access's Form Wizard, when I select these two tables, I get an error of:
You have chosen fields from record sources which the wizard can't connect. You may have chosen fields from a table and from a query based on that table.
How would I set up a form like this, if it's possible? If not, why can't I?

Creating long forms in FileMaker Pro

I am creating long forms in FileMaker Pro with many unique questions in each form.
Each unique question is comprised of: a radio button, two fields of support data, 4 container fields, and a field for comments. There is also a map feature that collects the device location when using an iPad.
Because each question is unique, I have been creating up to 8 fields for each question. The forms I am creating contain up to 40 questions.
Example fields:
Question1
Question1_Comments
Question1_Value1
Question1_Value2
Question1_Image[1], Question1_Image[2], Question1_Image[3], Question1_Image[4]
Is there is a simpler way of approaching this?
Yes. I can offer some general suggestions, but it sounds like you need to normalize your data. Whenever you start creating fields of the form Field1, Field2, etc., that's a hint that you should probably create a separate table. In your case it sounds like you need at least three tables:
Forms
Questions
Files
This is going from the information you've provided that each form has many questions and each question has many files (container fields). Assuming that your form table already has a primary key field (a field that is unique for every record, often an auto-enter serial number), the Questions table would have the following fields:
id (primary key)
form_id
question
comments
value1
value2
Then the Files table would have two fields:
id
question_id
file
Then you'd create a relationship from Forms to Questions with Forms::id=Questions::form_id and from Questions to Files with Questions::id=Files::question_id. If both of the value fields will always have data, I'd leave them in the Questions table, but if one of them could be blank, or if you think you may someday want more than two, I'd break that into it's own table as well.
Check the FileMaker documentation for more information on creating relationships.