Enter Parameter Value

dullster

Member
Local time
Yesterday, 20:52
Joined
Mar 10, 2025
Messages
67
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".
 
Not sure about tax rates, but benefit situations can care about extended statuses. For instance, in order to enable my mother's social security payments when she turned 65 (many years ago), I had to prove that she had divorced her first husband. Had to do with preventing a double-dip on survivor benefits. (Not that the bum who was her first husband would have had benefits to offer... but that would be too much dirty laundry.)
 
In the US, they take taxes out only based on single or married. They don't care to who or how many. Lol
 
Tax rates are computed using actuarial methods, or something similar, in order to estimate the "standard deduction." In Renaissance times, Shakespeare remarked, "Let's kill all the lawyers." Now, I think, it would be more profitable for the general public to kill all the actuaries.
 

Users who are viewing this thread

Back
Top Bottom