Yes, the error was my fault.
ProjectIDFK is numeric. That was the problem.
EmployeeCar is a yes/no field.
I am no longer getting the error now that I fixed that.
Why are you trying to stay away from my final objective?
The database has certain limitations. It was not fully normalized in the...
Sorry I messed up the field names; it should have been:
UPDATE tblProjects INNER JOIN tblProjectPeopleRoles ON tblProjects.ProjectID = tblProjectPeopleRoles.ProjectIDFK SET tblProjects.EmployeeCar = IIf([RoleIDFK]="3","-1","0");
Thanks, dhookom. How is it the same information.
I am trying to say: if Role X is associated with a record in the junction table, put a different value in a different table, different field.
I came up with this but am getting a type conversion error failure:
UPDATE tblProjects INNER JOIN tblProjectPeopleRoles ON tblProjects.ProjectID = tblProjectPeopleRoles.ProjectIDFK SET tblProjects.ProjectHasDriver = IIf([RoleIDFK]="3","-1","0");
ProjectHasDriver is a yes/no field.
This might...
There was no typo. That reference is the in the criteria. It is only use to establish the match, and the code that I posted does update the field to "-1" when the Role=3.
My people can have different roles in different projects, even different roles in the same project.
I have a junction...
I am a beginner and by no means claim to have a thorough understanding of any of this, but this is how I think this works.
If I understand this correctly, yes, if the EmployeeID currently showing in frmCourseInfo is 5, then it would be the same as WHERE EmployeeID = 5.
Referring to the form...
1. Why shouldn't it work, and if it shouldn't why does it work?
It does update the field with "-1" when the role is 3.
2. How do I handle the other part, when it Role 3 is removed or changed?
Thanks
I am having trouble figuring out how to accomplish the following:
I have a form linked to tblProjects and subform linked to the junction table tblProjectEmployeeRole.
There is an After Update event on the subform:
If Me.fkRoleID = 3 Then
DoCmd.RunSQL "UPDATE tblEmployees SET EmloyeeCar = '-1'...
Hello,
I am a novice and am trying to develop a database for managing course and instructor information.
I have courses, instructors, TAs, and readers.
Each course can have more than one instructor, TA, or reader (for example,
1 instructor, 2 TAs, 1 reader or 2 instructors, 1 TA, and 2 readers...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.