Re: Combo goes blank on form requery
- From: "Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx>
- Date: Mon, 29 Oct 2007 14:26:16 +0900
Hi Jeff
There are several variations on this little issue.
There's a valid case where the combo's Bound Column is not its display column, and the RowSource is filtered in such a way that it does not have the record it needs to display. (Given your experience, I doubt this is your issue.)
Access does have some serious display problems where a form returns no records (not even the new record), and so the Detail section goes completely blank. In this case, it becomes bamboozled about any controls in the Form Header or Form Footer. More info and a sample:
Incorrect display of data
at:
http://allenbrowne.com/bug-06.html
There is also a timing bug in Access where it fails to display the data correctly after a requery. This occurs in all versions of Access, but only in combos where the bound column is not the display column. If the combo is selected, the selection may even be the width of the characters, but the characters are not visible. I don't know how to prevent this. A Requery in Form_Current won't do it (seems to be too early.)
There was one quirky workaround that involved placing a text box over (or was it partially behind?) the combo, which seemed to affect the way Access updates the screen. Can't recall if you had to set the Transparent property to get this to work.
It's darned annoying. The only real workaround I know of is not to make the combo's bound column the first visible column. For example, intead of a lookup table like this:
CategoryID AutoNumber
Category Text
use:
CategoryID Text
SortOrder Number
The foreign key is then a Text field, so you don't hide it, so the problem doesn't occur.
HTH
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Jeff" <no-reply@xxxxxxxxxxxx> wrote in message
news:4725682b$0$17150$5a62ac22@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I don't remember this being that hard. Or maybe it's just early senility.
On a simple bound continuous form I have a combo for filtering the form by customer. The form record source is a sql statement that checks the combo and filters accordingly. The combo simply requeries the form.
More often than not the selection in the combo disappears after the requery, though not always. The only consistence seems to be that if the result is no records then the selection is gone, but if there are records then it may or may not remain.
And sometimes if I click on the combo the selection will return.
Life gets stranger by the day. Is this all a test? Is someone really watching and designing these little tests to see if we crack under the pressure. I laugh...ha..ha..ha. I shall never break, though I may bend I shall always return to an upright position. Am I raving. No. I am alright. Everything is in place. I am home and still.......what was that? Wait....footsteps....aaaargh........
Jeff
""
http://www.asken.com.au
.
- Follow-Ups:
- Re: Combo goes blank on form requery
- From: Jeff
- Re: Combo goes blank on form requery
- References:
- Combo goes blank on form requery
- From: Jeff
- Combo goes blank on form requery
- Prev by Date: Combo goes blank on form requery
- Next by Date: Re: Combo goes blank on form requery
- Previous by thread: Combo goes blank on form requery
- Next by thread: Re: Combo goes blank on form requery
- Index(es):
Relevant Pages
|