correcting data in subform

  • Thread starter leahf via AccessMonster.com
  • Start date
L

leahf via AccessMonster.com

I was asked to change a form in an existing application.

Departments in a company can order equipment. When a new order is chosen
there is a transfer to a new form where general information is filled in
(department, dates for delivery etc.) and then the form has a subform where
the list of the amount of equipment can be filled in.

Up until now there was no checking if the items were in stock. Someone could
order 15 flashlights even though there might not be any flashlights in stock
or maybe only 3 left.

I now am changing it so that there is a check againt the inventory. If, for
example, someone ordered 15 flashlights and there are not in stock I give a
message and ask if the order should be cancelled or corrected. If the order
is to be corrected the focus remains on the amount text box. However, if I
want to correct the item and not the amount, I get stuck. It remains focused
on the amount and keeps giving the error message.

How can I leave the option open as to what is to be corrected?

Thanks.
leah
 
J

Jeanette Cunningham

Hi leahf,
I am guessing that you have the checking of the number ordered in the before
update of the
amount textbox. If that is what you have, you could move that check to the
before update event of the form.

In the before update of the amount textbox, you could just issue a warning
message without canceling the update.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
K

Klatuu

It seems that if you are checking for problems, you would know what caused
the problem and be able to set the focus to the control that needs correction.
 
L

leahf via AccessMonster.com

Perfect! Thank you very much.
Leah

Jeanette said:
Hi leahf,
I am guessing that you have the checking of the number ordered in the before
update of the
amount textbox. If that is what you have, you could move that check to the
before update event of the form.

In the before update of the amount textbox, you could just issue a warning
message without canceling the update.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
I was asked to change a form in an existing application.
[quoted text clipped - 26 lines]
Thanks.
leah
 
L

leahf via AccessMonster.com

By moving the check to the before update form solved the problem, but just to
explain...

If someone MEANT to order 15 flashlights but actually ordered something that
was listed right before or after "flashlights" (that does happen) and gets a
message that the amount is not in stock - the solution is not to change the
amount but to change the item. That was the case that I was checking and
found that I couldn't resolve it.

THanks for responding.
Leah
It seems that if you are checking for problems, you would know what caused
the problem and be able to set the focus to the control that needs correction.
I was asked to change a form in an existing application.
[quoted text clipped - 18 lines]
Thanks.
leah
 

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