A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Tax Exemption Case.



 
 
Thread Tools Display Modes
  #1  
Old August 8th, 2007, 10:50 PM posted to microsoft.public.access.tablesdbdesign
Sohn
external usenet poster
 
Posts: 8
Default Tax Exemption Case.


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.





  #2  
Old August 8th, 2007, 11:04 PM posted to microsoft.public.access.tablesdbdesign
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Tax Exemption Case.

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

--
Duane Hookom
Microsoft Access MVP


"Sohn" wrote:


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.





  #3  
Old August 8th, 2007, 11:40 PM posted to microsoft.public.access.tablesdbdesign
Sohn
external usenet poster
 
Posts: 8
Default Tax Exemption Case.


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" wrote:

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

--
Duane Hookom
Microsoft Access MVP


"Sohn" wrote:


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.





  #4  
Old August 8th, 2007, 11:56 PM posted to microsoft.public.access.tablesdbdesign
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Tax Exemption Case.

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" wrote:


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" wrote:

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

--
Duane Hookom
Microsoft Access MVP


"Sohn" wrote:


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.





  #5  
Old August 9th, 2007, 12:00 AM posted to microsoft.public.access.tablesdbdesign
Sohn
external usenet poster
 
Posts: 8
Default Tax Exemption Case.


Dear Mr.Hookom,

A better method.

Thank you.

"Duane Hookom" wrote:

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" wrote:


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" wrote:

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

--
Duane Hookom
Microsoft Access MVP


"Sohn" wrote:


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.





  #6  
Old August 9th, 2007, 03:22 AM posted to microsoft.public.access.tablesdbdesign
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Tax Exemption Case.

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" wrote:


Dear Mr.Hookom,

A better method.

Thank you.

"Duane Hookom" wrote:

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" wrote:


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" wrote:

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

--
Duane Hookom
Microsoft Access MVP


"Sohn" wrote:


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.





 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:36 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.