Tax Exemption Case.

G

Guest

Hi, there,

I am building an invoice form which needs tax exemption case.

The first step I took was adding yes/no data type field to customer table.

Then, I put an invisible textbox named taxcode which bring the yes/no field
value when the invoice form loads by using onload command as follow:

If Me.taxcode = 0 then

Me.tax = 0

End If

The tax field has control source. (=[total]*[taxrate];Currency Format)

When a tax exemption customer loaded, the form gives a run time error, "You
can't assign a value to this object".

Could anyone tell me how to fix this problem? Moreover, is there any better
way to distinguish tax/none tax pay customer otherthan what I have used above?

Thank you.
 
G

Guest

I would set the control source to:
=[total]*[taxrate] * Abs([YourYesNoFieldName])
 
G

Guest

Dear Mr.Hookom,

Thank you very much for your help, it works great.

BTW, is there any better way to achieve the same result than using I have?

Thank you

Duane Hookom said:
I would set the control source to:
=[total]*[taxrate] * Abs([YourYesNoFieldName])

--
Duane Hookom
Microsoft Access MVP


Sohn said:
Hi, there,

I am building an invoice form which needs tax exemption case.

The first step I took was adding yes/no data type field to customer table.

Then, I put an invisible textbox named taxcode which bring the yes/no field
value when the invoice form loads by using onload command as follow:

If Me.taxcode = 0 then

Me.tax = 0

End If

The tax field has control source. (=[total]*[taxrate];Currency Format)

When a tax exemption customer loaded, the form gives a run time error, "You
can't assign a value to this object".

Could anyone tell me how to fix this problem? Moreover, is there any better
way to distinguish tax/none tax pay customer otherthan what I have used above?

Thank you.
 
G

Guest

I'm not sure what you are asking. Do you want a better method than I
suggested or are you asking why your solution didn't work as expected?
--
Duane Hookom
Microsoft Access MVP


Sohn said:
Dear Mr.Hookom,

Thank you very much for your help, it works great.

BTW, is there any better way to achieve the same result than using I have?

Thank you

Duane Hookom said:
I would set the control source to:
=[total]*[taxrate] * Abs([YourYesNoFieldName])

--
Duane Hookom
Microsoft Access MVP


Sohn said:
Hi, there,

I am building an invoice form which needs tax exemption case.

The first step I took was adding yes/no data type field to customer table.

Then, I put an invisible textbox named taxcode which bring the yes/no field
value when the invoice form loads by using onload command as follow:

If Me.taxcode = 0 then

Me.tax = 0

End If

The tax field has control source. (=[total]*[taxrate];Currency Format)

When a tax exemption customer loaded, the form gives a run time error, "You
can't assign a value to this object".

Could anyone tell me how to fix this problem? Moreover, is there any better
way to distinguish tax/none tax pay customer otherthan what I have used above?

Thank you.
 
G

Guest

Dear Mr.Hookom,

A better method.

Thank you.

Duane Hookom said:
I'm not sure what you are asking. Do you want a better method than I
suggested or are you asking why your solution didn't work as expected?
--
Duane Hookom
Microsoft Access MVP


Sohn said:
Dear Mr.Hookom,

Thank you very much for your help, it works great.

BTW, is there any better way to achieve the same result than using I have?

Thank you

Duane Hookom said:
I would set the control source to:
=[total]*[taxrate] * Abs([YourYesNoFieldName])

--
Duane Hookom
Microsoft Access MVP


:


Hi, there,

I am building an invoice form which needs tax exemption case.

The first step I took was adding yes/no data type field to customer table.

Then, I put an invisible textbox named taxcode which bring the yes/no field
value when the invoice form loads by using onload command as follow:

If Me.taxcode = 0 then

Me.tax = 0

End If

The tax field has control source. (=[total]*[taxrate];Currency Format)

When a tax exemption customer loaded, the form gives a run time error, "You
can't assign a value to this object".

Could anyone tell me how to fix this problem? Moreover, is there any better
way to distinguish tax/none tax pay customer otherthan what I have used above?

Thank you.
 
G

Guest

You stated "it works great" and it can't be a whole simpler since it doesn't
involve any code modules. There may be a better expression but I can't think
of it.

--
Duane Hookom
Microsoft Access MVP


Sohn said:
Dear Mr.Hookom,

A better method.

Thank you.

Duane Hookom said:
I'm not sure what you are asking. Do you want a better method than I
suggested or are you asking why your solution didn't work as expected?
--
Duane Hookom
Microsoft Access MVP


Sohn said:
Dear Mr.Hookom,

Thank you very much for your help, it works great.

BTW, is there any better way to achieve the same result than using I have?

Thank you

:

I would set the control source to:
=[total]*[taxrate] * Abs([YourYesNoFieldName])

--
Duane Hookom
Microsoft Access MVP


:


Hi, there,

I am building an invoice form which needs tax exemption case.

The first step I took was adding yes/no data type field to customer table.

Then, I put an invisible textbox named taxcode which bring the yes/no field
value when the invoice form loads by using onload command as follow:

If Me.taxcode = 0 then

Me.tax = 0

End If

The tax field has control source. (=[total]*[taxrate];Currency Format)

When a tax exemption customer loaded, the form gives a run time error, "You
can't assign a value to this object".

Could anyone tell me how to fix this problem? Moreover, is there any better
way to distinguish tax/none tax pay customer otherthan what I have used above?

Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top