Solved mass record saving

TipsyWolf

Member
Local time
Today, 23:33
Joined
Mar 20, 2024
Messages
278
hey guys !

every time i add new employee's data it also saves all SiteTitles (8) times all trainers (3) and i get 24 records.
not really sure what i set up incorrectly. i checked everything and nothing found. here is the db.

it should open main menu nav. click on "add training". add basic info, click "add new emp" type full name and click at least 1 check boxes so employee record saves.
check test query.
 

Attachments

That kind of multiplicative behavior is a sign of a Cartesian JOIN, where you name two tables in the FROM clause and list the fields you want from both tables... but because the JOIN criteria aren't set correctly and a WHERE clause also is not set correctly, the JET or ACE database engine (and, for that matter, all other ANSI-compliant SQL engines from all vendors) will give you every possible combination of records from both tables even if some of those records don't belong together.

Look up JOIN clauses and recognize that you need a relationship between the two tables you named and you need to exploit that relationship. The general syntax appears in the FROM clause and might look like this:
Code:
SELECT ....bunch of fields... FROM TableA INNER JOIN TableB ON TableA.X = TableB.Y ...

That syntax merges the two tables. The other format that has the same effect but later in the query process is
Code:
SELECT ....bunch of fields... FROM TableA, TableB WHERE... AND (TableA.X = TableB.Y) ...

In either case, if you don't somehow constrain the records to honor the relationship, you would get the combinatorial exercise you described. Also, the JOIN, to work correctly, does NOT require that the JOINed fields appear in the SELECT clause's list of fields. The same is true for the WHERE case.

I very rarely open someone else's database so forgive me for not actually using your field names. I'm just a little bit paranoid sometimes, no disrespect intended.
 
thanks you for your reply. now i understand my mistake.
im missing attendee table \ training session which @LarryE designed the structure properly in his version. im gonna need to re-build half of what i did with dozens hours on UI.
im not sure what i would do without AWF...
 
Last edited:
Do you ever have more than 1 trainer for each training session?
This is how to include session ratings into the mix. I am working on the forms.
1743349172361.png

One other thing. Are these ratings supposed to be anonymous? Or are you going to actually input the ratings the employees give into your project. If they are anonymous, then you shouldn't have an input form for ratings and comments or even a table to track them.
 
Are these ratings supposed to be anonymous?
no, they are not
Or are you going to actually input the ratings the employees give into your project
yes, its me who input the actual rating. i made pdf file to be attached to every training session, so wont be a problem to do random checks if someone decided to hide things like bad \ average rating.

Do you ever have more than 1 trainer for each training session?
no. its solo trainings.
 

Users who are viewing this thread

Back
Top Bottom