Discussion Locked

MS Access

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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
(form_name.recordset.requery)
(form_name.recordset.refresh)

but with no success.

what can I do ?

many thanks
Itay

5 replies

by ka75

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

Thank You

Itay

by swleffler

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.

by ka75

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.

by misscrf

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....

This discussion is closed to new replies.