SwitchBoard with Filter and Button + More actions

Discuss the database features

SwitchBoard with Filter and Button + More actions

Postby DreamerArgentino » Mon Dec 03, 2018 6:38 pm

Hi all!
I have this base: (see attached): and I would need that: the data I choose in the Switchboard is "injected" in the field "ID- Dept "of the table" TBL-Students "when choosing initially, and simultaneously create a new record in the form" FRM-Students01 "

I hope you can help me! Thank you
DreamerArgentino.-
Attachments
TASKS-0004 SwitchBoard.odb
(30.53 KiB) Downloaded 22 times
OpenOffice 4.1.5 On Windows 10
DreamerArgentino
 
Posts: 17
Joined: Sun May 20, 2018 12:02 am

Re: SwitchBoard with Filter and Button + More actions

Postby UnklDonald418 » Wed Dec 05, 2018 6:39 am

To open the form document FRM-Students01 ready to enter a new record, open the Form Properties dialog for "MainForm" and on the Data tab change the Add data only property to Yes.

The form document Initial-Switchboard01 makes things needlessly complicated.
Since the selected value for field "ID- Dept" is ultimately stored in TBL-Students why not just use a list box on "MainForm" of FRM-Students01 to select a Department.
If you want to force the user to select a Department when entering a new Student record, an easy solution would be to add a NOT NULL constraint to the column "ID- Dept"

To do that you will first need to either edit all the existing student records and add a value in the "ID-Dept" column, or delete those records. Then execute the following SQL command
Code: Select all   Expand viewCollapse view
ALTER TABLE "TBL-Students" ALTER COLUMN "ID-Dept" SET NOT NULL;

Then if the user attempts to enter a new student record without selecting a Department they will get an error dialog.
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.6 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1085
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA


Return to Base

Who is online

Users browsing this forum: No registered users and 2 guests