F
Fred Loh
i have a table with a yes/no field call "Edited". i have a button that runs
code to set the "Edited" field of a selected record to "yes". the code also
set the rowsource (using SQL Update and Set statement) of a combo box to
display only records with the "Edited" field = "No". the button and the combo
box are on the same form. the record is selected from the combo box.
when i step through the code in debug mode, the combo box nicely displays
correctly only records with the "Edited" field = "No". which could mean
nothing wrong with the code? but when i click the button in open form mode
and open the combo box, the combo box displays both the record with the
"Edited" field = Yes and records with "Edited" field = No. for the record
where the "Edited" field has been set to "Yes", the "edited" field displayed
in the combo box shows a "No". the "Edited" field change to a "Yes" only
after i open the combo box twice. the record with the "Edited" field = "Yes"
disappears from the combo box only after i have set another record's "Edited"
field to "yes". this does not happen all the time though.
what have i done wrong? what is the right way to do it so that the combo box
correctly display only records where "Edited" field ="No" at all times?
thanks for your help.
code to set the "Edited" field of a selected record to "yes". the code also
set the rowsource (using SQL Update and Set statement) of a combo box to
display only records with the "Edited" field = "No". the button and the combo
box are on the same form. the record is selected from the combo box.
when i step through the code in debug mode, the combo box nicely displays
correctly only records with the "Edited" field = "No". which could mean
nothing wrong with the code? but when i click the button in open form mode
and open the combo box, the combo box displays both the record with the
"Edited" field = Yes and records with "Edited" field = No. for the record
where the "Edited" field has been set to "Yes", the "edited" field displayed
in the combo box shows a "No". the "Edited" field change to a "Yes" only
after i open the combo box twice. the record with the "Edited" field = "Yes"
disappears from the combo box only after i have set another record's "Edited"
field to "yes". this does not happen all the time though.
what have i done wrong? what is the right way to do it so that the combo box
correctly display only records where "Edited" field ="No" at all times?
thanks for your help.