Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update a text box using query

Status
Not open for further replies.

oxicottin

Programmer
Jun 20, 2008
353
0
0
US
hello, Im trying to setup this DB but am having such a hard time. I have a subform (frmEmployeeFunctionsSubform) and next to each combo box (cboArea) I want to have a text box that says if the employee completed all the requirements for the functional area it will show "completed" and if not then "Not Completed". I also need to have the combo box (cboArea) hide values that I have already chosen. For instance if I had chosen Supply Operator I dont want it in the list to choose again.

Thanks,
SoggyCashew.....
 
 https://files.engineering.com/getfile.aspx?folder=02fd77f2-87ae-4b9a-85dc-001843743b9d&file=OperatorRate_V8-22-18.zip
I don't recall all of your code and how the requirements get appended. You would need to delete the requirements for the function area that was overwritten prior to appending the new requirements for the new area. Is this what you expect to happen?

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
I would change the SQL of the append query to:

SQL:
INSERT INTO tblEmployeeRequirements ( FuncID, FuncReqID )
SELECT tblFunctionRequirements.FuncID, tblFunctionRequirements.FuncReqID
FROM tblFunctionRequirements LEFT JOIN tblEmployeeRequirements ON tblFunctionRequirements.FuncReqID = tblEmployeeRequirements.FuncReqID
WHERE (((tblFunctionRequirements.FuncID)=[Forms]![frmEmployees]![frmEmployeeFunctionsSubform]![FuncID]) AND ((tblEmployeeRequirements.RequirementID) Is Null));

I would also create a "cleanup" delete query that removes all of the requirements that are not in an assigned area/function for all employees.


Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
If your [tt]Iff[/tt] logic sequence is what you want, this can be expressed simply by:

Code:
If [Expr1] = 1 Then
    If [FuncID] = 1 OR [FuncID] = 2 Then
        "OPERATOR 1"
    Else
        "OPERATOR 2"
    End If
End If
Right? [ponder]


---- Andy

There is a great need for a sarcasm font.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top