PC Review


Reply
Thread Tools Rate Thread

Calculation not accepted if value is 0

 
 
=?Utf-8?B?a3RmcnViZWw=?=
Guest
Posts: n/a
 
      29th Jun 2006
I have made a very simple query that calculates a field called qty_to_order.
The 2 fields that create the calucaltion is Maintenance - Physical. The
formula works really well for what I need it to do until the answer is 0.
Then I get an error message that says I violate a validation rule in the main
table. Now I do not have the calculation going to the main table. (I know
this can't be done). If the answer is 0 how can I proceed on to the next
record?


Thanks for any help anyone can give

Tara
 
Reply With Quote
 
 
 
 
Steve Schapel
Guest
Posts: n/a
 
      30th Jun 2006
Tara,

What is the Validation Rule in the main table that is being violated
here? Maybe the problem is not directly related to the calculation, or
the result thereof. If the "answer" is 0, then this presumably means
that Maintenance=Physical, so maybe there is a validation rule...
[Maintenance]>[Physical]
.... or something else related to the data, so whatever the validation
rule is, it will need to be adjusted to cater to the real data rules.

--
Steve Schapel, Microsoft Access MVP

ktfrubel wrote:
> I have made a very simple query that calculates a field called qty_to_order.
> The 2 fields that create the calucaltion is Maintenance - Physical. The
> formula works really well for what I need it to do until the answer is 0.
> Then I get an error message that says I violate a validation rule in the main
> table. Now I do not have the calculation going to the main table. (I know
> this can't be done). If the answer is 0 how can I proceed on to the next
> record?
>
>
> Thanks for any help anyone can give
>
> Tara

 
Reply With Quote
 
=?Utf-8?B?a3RmcnViZWw=?=
Guest
Posts: n/a
 
      30th Jun 2006
Steve,
Thank you so much for responding. I have looked and relooked in the main
table, and I have never set any validation rules. I have tried deleting and
re-entering the fields to make sure there were no validation rules. I have
them set to a "number field" I even had my supervisor who is an Access guru,
look at it and she can't figure it out. Maybe if I explaine what I am doing
it could make it a bit more clear.
I have had to create an inventory database (the template provided by access
is a little more than we need right now.). I have 2 number fields
Qty_to_Maintain and Phyical_Count. In my query I have created a field called
Amount to Order: [qty_to_maintain]-[Physical_Count]. Everything is great if
the answer is not 0. If it is 3 to manintain and 2 Phyical=1 to order. If
maint is 4 and we have 5 then -1 is the answer. But if maint is 3 and on
hand is 3 the answer is 0, and that is where the problem begins.

thanks for your help

"Steve Schapel" wrote:

> Tara,
>
> What is the Validation Rule in the main table that is being violated
> here? Maybe the problem is not directly related to the calculation, or
> the result thereof. If the "answer" is 0, then this presumably means
> that Maintenance=Physical, so maybe there is a validation rule...
> [Maintenance]>[Physical]
> .... or something else related to the data, so whatever the validation
> rule is, it will need to be adjusted to cater to the real data rules.
>
> --
> Steve Schapel, Microsoft Access MVP
>
> ktfrubel wrote:
> > I have made a very simple query that calculates a field called qty_to_order.
> > The 2 fields that create the calucaltion is Maintenance - Physical. The
> > formula works really well for what I need it to do until the answer is 0.
> > Then I get an error message that says I violate a validation rule in the main
> > table. Now I do not have the calculation going to the main table. (I know
> > this can't be done). If the answer is 0 how can I proceed on to the next
> > record?
> >
> >
> > Thanks for any help anyone can give
> >
> > Tara

>

 
Reply With Quote
 
Steve Schapel
Guest
Posts: n/a
 
      30th Jun 2006
Tara,

Thanks for the further explanation. However, there must be an
explanation for this behaviour. Can you please let us know the exact
wording of the error message you receive? And can you also say *when*
you receive this error message?

If you go to the design view of the table, select Properties from the
View menu. Can you confirm that there is no Validation Rule entered there?

--
Steve Schapel, Microsoft Access MVP

ktfrubel wrote:
> Steve,
> Thank you so much for responding. I have looked and relooked in the main
> table, and I have never set any validation rules. I have tried deleting and
> re-entering the fields to make sure there were no validation rules. I have
> them set to a "number field" I even had my supervisor who is an Access guru,
> look at it and she can't figure it out. Maybe if I explaine what I am doing
> it could make it a bit more clear.
> I have had to create an inventory database (the template provided by access
> is a little more than we need right now.). I have 2 number fields
> Qty_to_Maintain and Phyical_Count. In my query I have created a field called
> Amount to Order: [qty_to_maintain]-[Physical_Count]. Everything is great if
> the answer is not 0. If it is 3 to manintain and 2 Phyical=1 to order. If
> maint is 4 and we have 5 then -1 is the answer. But if maint is 3 and on
> hand is 3 the answer is 0, and that is where the problem begins.

 
Reply With Quote
 
=?Utf-8?B?a3RmcnViZWw=?=
Guest
Posts: n/a
 
      3rd Jul 2006
Steve,
Again thank you for responding. I messed with this table all day on Friday,
and could not find any where where the validation rule was written. So I
deleted the table and created it again. And now everything is working how it
should. So that is telling me that there was something wrong in the main
table, but for the life of me I coudn't find it.
Thank you for your help, and If I need any further help, I will post it here.



Thanks

"Steve Schapel" wrote:

> Tara,
>
> Thanks for the further explanation. However, there must be an
> explanation for this behaviour. Can you please let us know the exact
> wording of the error message you receive? And can you also say *when*
> you receive this error message?
>
> If you go to the design view of the table, select Properties from the
> View menu. Can you confirm that there is no Validation Rule entered there?
>
> --
> Steve Schapel, Microsoft Access MVP
>
> ktfrubel wrote:
> > Steve,
> > Thank you so much for responding. I have looked and relooked in the main
> > table, and I have never set any validation rules. I have tried deleting and
> > re-entering the fields to make sure there were no validation rules. I have
> > them set to a "number field" I even had my supervisor who is an Access guru,
> > look at it and she can't figure it out. Maybe if I explaine what I am doing
> > it could make it a bit more clear.
> > I have had to create an inventory database (the template provided by access
> > is a little more than we need right now.). I have 2 number fields
> > Qty_to_Maintain and Phyical_Count. In my query I have created a field called
> > Amount to Order: [qty_to_maintain]-[Physical_Count]. Everything is great if
> > the answer is not 0. If it is 3 to manintain and 2 Phyical=1 to order. If
> > maint is 4 and we have 5 then -1 is the answer. But if maint is 3 and on
> > hand is 3 the answer is 0, and that is where the problem begins.

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
See the accepted papers, keynote lecture, plenary lectures, thecontents of the Book of the Proceedings (i.e. accepted papers). WSEASPost-Conference Report for the Conferences MACMESE '07 and DNCOCO '07 (124images) Kostas I. Microsoft Excel Programming 0 7th Dec 2007 04:20 PM
How do I use a rounded calculation result in another calculation? =?Utf-8?B?dm5zcm9kMjAwMA==?= Microsoft Excel Worksheet Functions 1 26th Jan 2005 10:11 PM
How do I use a rounded calculation result in another calculation? =?Utf-8?B?dm5zcm9kMjAwMA==?= Microsoft Excel Worksheet Functions 1 26th Jan 2005 09:36 PM
Concatenating a Calculation with Text causes the Calculation to be incorrect?? Nelson Microsoft Excel Worksheet Functions 4 1st Apr 2004 06:51 PM
range.calculation with UDF not working when calculation is set to automatic Brian Murphy Microsoft Excel Programming 5 14th Oct 2003 07:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:00 AM.