Creating forms for data entry
Creating forms for data entry
Hi All:
I'm a bit confused and it may be my inexperience with BASE. I created a database with several tables. The main table is a list of projects and has various fields within it including ProjectManager, LocationOfProject, Supplier, etc. Each of these fields is a foreign key into an associated table. So there is a ProjectManager table, a Location table, Supplier table etc.
So I created forms for the tables and can easily enter data for ProjectManager etc. What I'd like to do is create a form for entering the data for the Projects table that have fields that will display a list menu for the data in associated tables so the person entering the data can select the appropriate entry.
So the question(s) is/are:
(1) Can this be done?
(2) If so, how?
Any help is appreciated.
Steve Y
I'm a bit confused and it may be my inexperience with BASE. I created a database with several tables. The main table is a list of projects and has various fields within it including ProjectManager, LocationOfProject, Supplier, etc. Each of these fields is a foreign key into an associated table. So there is a ProjectManager table, a Location table, Supplier table etc.
So I created forms for the tables and can easily enter data for ProjectManager etc. What I'd like to do is create a form for entering the data for the Projects table that have fields that will display a list menu for the data in associated tables so the person entering the data can select the appropriate entry.
So the question(s) is/are:
(1) Can this be done?
(2) If so, how?
Any help is appreciated.
Steve Y
Window 7, OpenOffice 3.4
Re: Creating forms for data entry
Hello,
Your keyword is "List Box". I've put three of them into the Table Control of form "projects".
The bound table of the MainForm is table "projects", entries in the List Boxes are made via SQL, e.g.
If you don't like them to be in the Table Control you can see one single List Box upright.
To show the associated datas i bound two subforms to the MainForm.
Greats R
Yes, for sure!syouchnow wrote:(1) Can this be done?
See attached example.syouchnow wrote:(2) If so, how?
Your keyword is "List Box". I've put three of them into the Table Control of form "projects".
The bound table of the MainForm is table "projects", entries in the List Boxes are made via SQL, e.g.
Code: Select all
SELECT "Name", "ID_PM" FROM "ProjectManager"To show the associated datas i bound two subforms to the MainForm.
Greats R
- Attachments
-
- Listfields_projects.odb
- (13.25 KiB) Downloaded 304 times
- MMove 1.0.6
- Extension for easy, exact positioning of shapes, pictures, controls, frames ...
- my current system
- Windows 11 AOO, LO | Linux Mint AOO, LO
Re: Creating forms for data entry
Thanks for your help, that looks like just what I need.
Steve
Steve
Window 7, OpenOffice 3.4
-
TotalCareChiro
- Posts: 9
- Joined: Wed Jul 11, 2012 6:27 pm
Re: Creating forms for data entry
I have a problem in creating a form for Data Entry and figured that I'd just piggyback on another thread as the OP may run into this problem.
I have a table (Customers) whose PK (Customer_ID) is generated via autovalue. I have created a form for simple text entry but have left the Customer_ID field off the form because it should be generated with each record; however, every time I try and input a record through the form I get the following error:
I'm not a stranger to SQL so I know that this error means that the form is trying to execute an INSERT INTO command without a required variable: but this is supposed to be generated automatically with each record. I'm at a loss as to how to fix this!
Your help is greatly appreciated!
-Justin
I have a table (Customers) whose PK (Customer_ID) is generated via autovalue. I have created a form for simple text entry but have left the Customer_ID field off the form because it should be generated with each record; however, every time I try and input a record through the form I get the following error:
Code: Select all
Error: Attempt to insert null into non-nullable column: Column: Customer_ID table: Customers ... *stuff*Your help is greatly appreciated!
-Justin
OpenOffice 3.4 on Windows XP 32 Bit
Re: Creating forms for data entry
menu:Tools>SQL...... but this is supposed to be generated automatically with each record.
Code: Select all
ALTER TABLE "Customers" ALTER COLUMN "Customer_ID" INT GENERATED BY DEFAULT AS IDENTITYPlease, 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
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
TotalCareChiro
- Posts: 9
- Joined: Wed Jul 11, 2012 6:27 pm
Re: Creating forms for data entry
Error received:Villeroy wrote:menu:Tools>SQL...... but this is supposed to be generated automatically with each record.Code: Select all
ALTER TABLE "Customers" ALTER COLUMN "Customer_ID" INT GENERATED BY DEFAULT AS IDENTITY
Code: Select all
1: Column is referenced in constraint or view: SYS_REF_SYS_FK_100_104 in statement [ALTER TABLE "Customers" ALTER COLUMN "Customer_ID" INT GENERATED BY DEFAULT AS IDENTITY]OpenOffice 3.4 on Windows XP 32 Bit
Re: Creating forms for data entry
Remove the relation and try again.
Code: Select all
ALTER TABLE "Other Table" DROP CONSTRAINT "SYS_REF_SYS_FK_100_104";
ALTER TABLE "Customers" ALTER COLUMN "Customer_ID" INT GENERATED BY DEFAULT AS IDENTITY;
ALTER TABLE "Other Table" ADD CONSTRAINT "Customer_Foreign_Key" FOREIGN KEY ("Customer_ID") REFERENCES "Customers"("Customer_ID");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
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
TotalCareChiro
- Posts: 9
- Joined: Wed Jul 11, 2012 6:27 pm
Re: Creating forms for data entry
Attempted this code, received the following error:Villeroy wrote:Remove the relation and try again.Code: Select all
ALTER TABLE "Other Table" DROP CONSTRAINT "SYS_REF_SYS_FK_100_104"; ALTER TABLE "Customers" ALTER COLUMN "Customer_ID" INT GENERATED BY DEFAULT AS IDENTITY; ALTER TABLE "Other Table" ADD CONSTRAINT "Customer_Foreign_Key" FOREIGN KEY ("Customer_ID") REFERENCES "Customers"("Customer_ID");
Code: Select all
1: Constraint not found SYS_REF_SYS_FK_100_104 in table: SALES in statement [ALTER TABLE "SALES" DROP CONSTRAINT "SYS_REF_SYS_FK_100_104"]Code: Select all
2: Constraint not found SYS_REF_SYS_FK_100_104 in table: Treatments in statement [ALTER TABLE "Treatments" DROP CONSTRAINT "SYS_REF_SYS_FK_100_104"]Code: Select all
3: Constraint not found SYS_REF_SYS_FK_100_104 in table: SALES in statement [ALTER TABLE "SALES" DROP CONSTRAINT "SYS_REF_SYS_FK_100_104"]Code: Select all
ALTER TABLE "Customers" DROP CONSTRAINT "SYS_REF_SYS_FK_100_104"Code: Select all
4: Attempt to drop a system constraint in statement [ALTER TABLE "Customers" DROP CONSTRAINT "SYS_REF_SYS_FK_100_104"]OpenOffice 3.4 on Windows XP 32 Bit