General discussion


MS Access

By ka75 ·
I have a form connecting to a table. the table has a "status" field - 0,1,2,3 are the optional statuses. I created a combo box for changing a status and wrote a VB code that does things as the status changes.

very important ! the form shows only records with a staus of 0.

When the code begins it checks if the status is 0. if it is, changes are made and the status changes from 0 to 1.

when I try to change another record's status the code responds as if the status is 1 and not 0.

I tried to add to the code the methods requery and refresh

but with no success.

what can I do ?

many thanks

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by sgt_shultz In reply to MS Access

maybe you are just missing the step where you rezero the counter?

Collapse -

by ka75 In reply to

I don't know the optional code you are talking about. can you send an example of a code like that ?

Thank You


Collapse -

by swleffler In reply to MS Access

While the check both has "changed" the value has not been saved until you leave the control. Try executing either a save command or change focus to another control.

Collapse -

by ka75 In reply to

tried it - did not work.

I set the focus to a diffrent element in the form and then back to the code containing combo box. made no differents.

Thanks though.

Collapse -

by misscrf In reply to MS Access

I think you might need an on update or something to make the value = nothing, so that when you requery, it doesnt hold onto that 1 that it had from the changes. Try that....

Related Discussions

Related Forums