Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / October 2007

Tip: Looking for answers? Try searching our database.

Combo goes blank on form requery

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeff - 29 Oct 2007 05:57 GMT
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
Allen Browne - 29 Oct 2007 06:26 GMT
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

Signature

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.

>I don't remember this being that hard. Or maybe it's just early senility.
>
[quoted text clipped - 19 lines]
> ""
> http://www.asken.com.au
Jeff - 29 Oct 2007 07:15 GMT
This is just strange. More timing than anything I think.

The combo is in the header and lookup has an alpha code for id. Combo is set
to display code.

Pick a customer and it may or may not display the selection (code). Even
when selecting the same code it can vary. If it is not shown clicking in the
combo text area usually shows the selection.

Anyway, got around it by showing each selection in an additional text box so
the user at least knows what was last selected if it disappears from the
combo.

Hate workarounds to bugs but they seem to be becoming the standard practice.

Years ago I started my career programming games in Assembler for 6502
processors (Commodore 64). This may be an old fools delusion but working
with Assembler was a hell of a lot easier than things like VB. We had more
control over the nuts and bolts, so to speak. Now too many assumptions are
made about what it thinks you really want to do, and gets it wrong a lot of
the time.

I'm rambling again.

Jeff
"Access dreaming"
www.asken.com.au

> Hi Jeff
>
[quoted text clipped - 61 lines]
>> ""
>> http://www.asken.com.au
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.