Enter Parameter Value

dullster

Member
Local time
Today, 11:29
Joined
Mar 10, 2025
Messages
44
This worked fine until I had to add "Marital Status" to my tblpayrolltaxes. Now I am getting the "Enter Parameter Value", "tblEmployee.Marital Status", on run.
I have Marital Status as the join which calculates correctly when I click Ok.

SELECT tblpayrolltaxes.MyUCA, tblpayrolltaxes.[Percent of Withholding], tblEmployees.DemoClientID, tblEmployees.[Basic Salary], tblEmployees.[Total of pay check], [tblEmployees]![Total of pay check]*[tblpayrolltaxes]![Percent of Withholding] AS [Recommended ded], IIf([tblEmployees].[Marital Status]="Married" And [Basic Salary]>17100,[Recommended ded],0) AS [Married Federal tax], IIf([tblEmployee].[Marital Status]="Single" And [Basic Salary]>6400,[Recommended ded],0) AS [Single Federal tax], tblEmployees.[Exempt from Taxes], IIf([Exempt from Taxes]=True,0) AS [Exempt Federal tax], [tblEmployees]![Extra Fed Tax]/[tblEmployees]![Salary Pay Period] AS [Extra Fed Taxes], [Married Federal tax]+[Single Federal Tax]+[Extra Fed Taxes] AS [Federal Tax]
FROM tblpayrolltaxes INNER JOIN tblEmployees ON tblpayrolltaxes.[Marital Status] = tblEmployees.[Marital Status]
WHERE (((tblpayrolltaxes.MyUCA)=16));

I tried several things but can't seem to find the fix. Does anyone see anything.
 
I think you forgot the S tblEmployees.

I would question the join on a field where I can’t imagine being a primary key in either table.
 
SQL:
SELECT tblpayrolltaxes.myuca,
       tblpayrolltaxes.[percent of withholding],
       tblemployees.democlientid,
       tblemployees.[basic salary],
       tblemployees.[total of pay check],
       [tblemployees] ! [total of pay check] * [tblpayrolltaxes] !
       [percent of withholding]
       AS [Recommended ded],
       Iif([tblemployees].[marital status] = "married"
           AND [basic salary] > 17100, [recommended ded], 0)
       AS [Married Federal tax],
       Iif([tblemployee].[Marital Status] = "single"
           AND [basic salary] > 6400, [recommended ded], 0)
       AS [Single Federal tax],
       tblemployees.[exempt from taxes],
       Iif([exempt from taxes] = true, 0)
       AS [Exempt Federal tax],
       [tblemployees] ! [extra fed tax] / [tblemployees] ! [salary pay period]
       AS
       [Extra Fed Taxes],
       [married federal tax]
       + [single federal tax] + [extra fed taxes]
       AS [Federal Tax]
FROM   tblpayrolltaxes
       INNER JOIN tblemployees
               ON tblpayrolltaxes.[marital status] =
                  tblemployees.[marital status]
WHERE  (( ( tblpayrolltaxes.myuca ) = 16 ))

to make readable.
 
Just for the simple explanation: When Access says "Enter Parameter Value" and names something, that something was named in your query and Access cannot find a source for it. That usually means either (a) it was spelled incorrectly or (b) you named its qualifier (containing table) incorrectly or (c) omitted a qualifier when one was needed.

Spelling errors CAN creep in when dealing with field names that include spaces, if you incorrectly punctuate the reference by omitting brackets to properly enclose the correct field name.
 
@dullster, why are you saving marital status as text? Seems that this should be a boolean (with a check box) to make things easier.
 
@dullster, why are you saving marital status as text? Seems that this should be a boolean (with a check box) to make things easier.

Then, of course, marital status could include "multiple wives" depending on religious factors.
 
Seems that this should be a boolean (with a check box) to make things easier.
It seems not.
Marital statuses possible in most jurisdictions would be: Single, Married, Divorced, Widowed
There may be several more, depending on jurisdiction and context.
 
It seems not.
Marital statuses possible in most jurisdictions would be: Single, Married, Divorced, Widowed
There may be several more, depending on jurisdiction and context.
From the context of dullster's post, they are only looking at "Single" or "Married" and using this for tax purposes. I am not familiar with a differing tax rate for "Single" vs "Divorced" or "Widowed".
 

Users who are viewing this thread

Back
Top Bottom