updating the value of control based on a calculated control

N

najah

Firstly, I am fairly new to access so I don't even know if this is possible.
I've created a form in order to track my product inventory. One of my
controls is InStock another is UnitsOrdered. I've created a calculated
control reflecting the current Stock by using: [InStock]-[UnitsOrdered]. I
need the InStock field to update in order to equal the CurrentStock once the
calculation occurs, Is this possible or should I be setting this up
differently. Help, it is driving me crazy
 
G

Guest

Hi,

Try to create a macro with SETVALUE (setvalue the InStock with
(InStock-UnitsOrdered). Attach the macro to the after update of UnitsOrdered.

Although is better to have a confirmation message after entering the
quantity - If is the correct one and then to update the InStock.

George


Ο χÏήστης "najah" έγγÏαψε:
 
N

najah via AccessMonster.com

Thanks George,

That worked, however I've run into another obstacle. I now need to know if
there is a way to make the UnitsOrdered reset to zero after all calculations
are completed for a particular record. because once the InStock field updates,
my form is still calculating the last amount entered in the UnitsOrdered
field. Thanks!
George said:
Hi,

Try to create a macro with SETVALUE (setvalue the InStock with
(InStock-UnitsOrdered). Attach the macro to the after update of UnitsOrdered.

Although is better to have a confirmation message after entering the
quantity - If is the correct one and then to update the InStock.

George

? ???st?? "najah" ????a?e:
Firstly, I am fairly new to access so I don't even know if this is possible.
I've created a form in order to track my product inventory. One of my
[quoted text clipped - 3 lines]
calculation occurs, Is this possible or should I be setting this up
differently. Help, it is driving me crazy
 
G

Guest

Hello again,

If I understood well this will work:

1) Create a new macro and use the Setvalue so it will set the value 0 (zero)
to UnitsOrdered.

2) Create a command button on your form and attach this macro to the click
event.

Bye and Good Luck


Ο χÏήστης "najah via AccessMonster.com" έγγÏαψε:
Thanks George,

That worked, however I've run into another obstacle. I now need to know if
there is a way to make the UnitsOrdered reset to zero after all calculations
are completed for a particular record. because once the InStock field updates,
my form is still calculating the last amount entered in the UnitsOrdered
field. Thanks!
George said:
Hi,

Try to create a macro with SETVALUE (setvalue the InStock with
(InStock-UnitsOrdered). Attach the macro to the after update of UnitsOrdered.

Although is better to have a confirmation message after entering the
quantity - If is the correct one and then to update the InStock.

George

? ???st?? "najah" ????a?e:
Firstly, I am fairly new to access so I don't even know if this is possible.
I've created a form in order to track my product inventory. One of my
[quoted text clipped - 3 lines]
calculation occurs, Is this possible or should I be setting this up
differently. Help, it is driving me crazy
 
G

Guest

Dear Najah,

If I understood well the following will work:

1) Create a Macro and use the Setvalue in order to set the value of
UnitsOrdered to 0 (zero).

2) Create a command button on your form and attach the a.m. macro on the
Click Event.

3) Or you can attache that macro if you need on the After Update another
field.

Hope this will the solution for you,

Regards

Ο χÏήστης "najah via AccessMonster.com" έγγÏαψε:
Thanks George,

That worked, however I've run into another obstacle. I now need to know if
there is a way to make the UnitsOrdered reset to zero after all calculations
are completed for a particular record. because once the InStock field updates,
my form is still calculating the last amount entered in the UnitsOrdered
field. Thanks!
George said:
Hi,

Try to create a macro with SETVALUE (setvalue the InStock with
(InStock-UnitsOrdered). Attach the macro to the after update of UnitsOrdered.

Although is better to have a confirmation message after entering the
quantity - If is the correct one and then to update the InStock.

George

? ???st?? "najah" ????a?e:
Firstly, I am fairly new to access so I don't even know if this is possible.
I've created a form in order to track my product inventory. One of my
[quoted text clipped - 3 lines]
calculation occurs, Is this possible or should I be setting this up
differently. Help, it is driving me crazy
 

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