Refreshing

  • Thread starter Thread starter dhstein
  • Start date Start date
D

dhstein

I have a ComboBox that selects error types from a query that runs against an
error list table and then deletes all records with a specific error code from
the table. After I've deleted records with error number 32 for example, the
combo box still shows that error code. What do I need to do to "refresh"
something at that point so error 32 no longer shows up in the ComboBox drop
down? Thanks for your help on this.
 
the VB Command you are looking for is Me.Requery or Me.Refresh but I don't
know how you are firing the delete code so I cannot advise where to put the
command.

I hope this helps????

Kindest Regards

Mike B
 
You need to requery the combo box control. Assuming the code to delete the
rows for the selected error is executed in the same form's module as that
containing the combo box then put code like the following after the code
which deletes the rows:

Me.[YourComboBoxNameGoesHere].Requery

Ken Sheridan
Stafford, England
 
This isn't working. The setup is that there is (1) a table of errors. There
is also (2) a query that finds distinct error numbers in (1). There is also
(3) a combo box that uses (2) to display possible rows to delete. And
finally there is (4) a query that gets a variable from the user selection in
(3) to delete the matching error codes in (1)

Ken Sheridan said:
You need to requery the combo box control. Assuming the code to delete the
rows for the selected error is executed in the same form's module as that
containing the combo box then put code like the following after the code
which deletes the rows:

Me.[YourComboBoxNameGoesHere].Requery

Ken Sheridan
Stafford, England

dhstein said:
I have a ComboBox that selects error types from a query that runs against an
error list table and then deletes all records with a specific error code from
the table. After I've deleted records with error number 32 for example, the
combo box still shows that error code. What do I need to do to "refresh"
something at that point so error 32 no longer shows up in the ComboBox drop
down? Thanks for your help on this.
 
You should requery (3) *after* executing (4).

Ken Sheridan
Stafford, England

dhstein said:
This isn't working. The setup is that there is (1) a table of errors. There
is also (2) a query that finds distinct error numbers in (1). There is also
(3) a combo box that uses (2) to display possible rows to delete. And
finally there is (4) a query that gets a variable from the user selection in
(3) to delete the matching error codes in (1)

Ken Sheridan said:
You need to requery the combo box control. Assuming the code to delete the
rows for the selected error is executed in the same form's module as that
containing the combo box then put code like the following after the code
which deletes the rows:

Me.[YourComboBoxNameGoesHere].Requery

Ken Sheridan
Stafford, England

dhstein said:
I have a ComboBox that selects error types from a query that runs against an
error list table and then deletes all records with a specific error code from
the table. After I've deleted records with error number 32 for example, the
combo box still shows that error code. What do I need to do to "refresh"
something at that point so error 32 no longer shows up in the ComboBox drop
down? Thanks for your help on this.
 
Back
Top