Clear combo box problem

  • Thread starter Thread starter Phil
  • Start date Start date
P

Phil

Hi,

I have a form with 8 combo boxes on it. All 8 get their
data from the same table with 3 fields in it (text, text,
number). The boxes are: bound =1, column count = 3, size
= 0;1;0. My problem comes when the user selects an entry
in the boxes and then wants to clear the entry. If they
highlight the entry, press the "Del" key, and then click
in another combo box, sometimes the entry will not go
away. It's gone when the "Del" key is pressed, but
returns when the other box is clicked. The strange thing
is it's not the same all the times. If I keep clearing
the entry, click another box, clear the entry, click
another box...... it will finally stay clear. Sometimes
it clears on the first try. There seems to be no pattern.

Any help would be appreciated.

Thanks,
Phil
 
In the OnClick procedure for yoru delete button be sure to include the
follwing code for each of the text boxes:

Me![NameofTextBox] = Null
Me![NameofTextbox].Requery

This will force all of the textboxes to 'look' at the table again to see
what the contents are.

Hope this helps,
Chad
 
Thanks Chad,

I don't have a delete button. I want the user to be able
to highlight the item shown in the combo box and the press
the delete "key" on the keyboard. Is this possible?

Thanks,
Phil
-----Original Message-----
In the OnClick procedure for yoru delete button be sure to include the
follwing code for each of the text boxes:

Me![NameofTextBox] = Null
Me![NameofTextbox].Requery

This will force all of the textboxes to 'look' at the table again to see
what the contents are.

Hope this helps,
Chad

Phil said:
Hi,

I have a form with 8 combo boxes on it. All 8 get their
data from the same table with 3 fields in it (text, text,
number). The boxes are: bound =1, column count = 3, size
= 0;1;0. My problem comes when the user selects an entry
in the boxes and then wants to clear the entry. If they
highlight the entry, press the "Del" key, and then click
in another combo box, sometimes the entry will not go
away. It's gone when the "Del" key is pressed, but
returns when the other box is clicked. The strange thing
is it's not the same all the times. If I keep clearing
the entry, click another box, clear the entry, click
another box...... it will finally stay clear. Sometimes
it clears on the first try. There seems to be no pattern.

Any help would be appreciated.

Thanks,
Phil
.
 
try Putting the code that I posted earlier in the AfterUpdate Event for the
combo box for each of the other combo boxes....


Chad

Phil said:
Thanks Chad,

I don't have a delete button. I want the user to be able
to highlight the item shown in the combo box and the press
the delete "key" on the keyboard. Is this possible?

Thanks,
Phil
-----Original Message-----
In the OnClick procedure for yoru delete button be sure to include the
follwing code for each of the text boxes:

Me![NameofTextBox] = Null
Me![NameofTextbox].Requery

This will force all of the textboxes to 'look' at the table again to see
what the contents are.

Hope this helps,
Chad

Phil said:
Hi,

I have a form with 8 combo boxes on it. All 8 get their
data from the same table with 3 fields in it (text, text,
number). The boxes are: bound =1, column count = 3, size
= 0;1;0. My problem comes when the user selects an entry
in the boxes and then wants to clear the entry. If they
highlight the entry, press the "Del" key, and then click
in another combo box, sometimes the entry will not go
away. It's gone when the "Del" key is pressed, but
returns when the other box is clicked. The strange thing
is it's not the same all the times. If I keep clearing
the entry, click another box, clear the entry, click
another box...... it will finally stay clear. Sometimes
it clears on the first try. There seems to be no pattern.

Any help would be appreciated.

Thanks,
Phil
.
 
Back
Top