Some Formulas Some Fixed Values

R

Rustle

How would I set up a table or query that would return a value based on
a formula for some criteria and a fixed value for others. For
example:

Let's say we have limits on how many items someone can borrow. Some
limits are based on how many items have been borrowed in a certain
time period, say, in the last three months. For the rest, we have a
fixed number of items they can borrow at one time.

So, let's say I have these conditions:

Fiction - 3 at a time
Non-fiction - 2 at a time
Video - 1 every three months

I have a form where a person can enter what the person is checking out
on a continuous form that lists the items and a box for the
quantity.

When either the user updates the field or clicks save to add the
records to my ItemsOut table, I want it to evaluate the number the
person entered against the conditions above and let them know if the
numbers exceed the criteria.

Any ideas?
 
P

pietlinden

How would I set up a table or query that would return a value based on
a formula for some criteria and a fixed value for others.  For
example:

Let's say we have limits on how many items someone can borrow.  Some
limits are based on how many items have been borrowed in a certain
time period, say, in the last three months.  For the rest, we have a
fixed number of items they can borrow at one time.

So, let's say I have these conditions:

Fiction - 3 at a time
Non-fiction - 2 at a time
Video - 1 every three months

I have a form where a person can enter what the person is checking out
on a continuous form that lists the items and a box for the
quantity.

When either the user updates the field or clicks save to add the
records to my ItemsOut table, I want it to evaluate the number the
person entered against the conditions above and let them know if the
numbers exceed the criteria.

Any ideas?

you trap using DCount() in the BeforeInsert event of the subform and
Cancel the insert if the patron is at the limit already.
 
K

KARL DEWEY

It would be hephful to know the table structure where the borrow/returns are
recorded.
Also some sample data.
 

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