Listbox selection, unselected when opening Internet Explorer (NO S

K

Kevin McCartney

Hi TWIMC,

Yes I know it's a very odd questions but I have a list box on a form in
Access 2002 and when the form is opened the list box is populated with
worksheet names from a selected default workbook. When I select the
worksheets names that I want to update, (usually all of them), the selection
shows all items selected, now when I open up a new session of Internet
Explorer (version 6.0,2900,2180 and no I can't upgrade any software, it's on
a work machine.) the list box is updated (but doesn't trigger the afterupdate
event, odd!) and no items are selected. I've even tried to lock and disable
the list box but to no avail. I've even tried it on another new database and
it's the same there too.

So has anyone come across such a thing or does anyone have any idea as to
what causes this, because then I may be able to solve it.

TIA
KM

P.S. Repost from yesterday since this forum was not responding, don't know
why but all questions from yesterday are un-answered.
 
K

Klatuu

The After Update event will not fire when the list box is changed in code.
This is true for all controls in Access. It has to be a manual entry by a
user.

I don't fully understand your description of open Internet Explorer and it
affecting your list box. Can you be more specific about the sequence of
events?
 
K

Kevin McCartney

What I ment by the AfterUpdate event not firing is when I open an internet
explore session. When I select an item on the list box I get my message box.
OK sequence of events.

Open the form

List Box is populated

I make my selection, e.g. select the top item, hold down the shift key and
select the last item in the list to select all of them.

Open Internet Explorer, return to the Access application and see my list box
that now has no items selected.

Thanks you in advance if you can replicate it and can figure out why

cheers

KM
 
K

Klatuu

I just tried what you described. I opened a form, selected all as you
described. Opened IE and closed it. My selections remained.

Could there be code in your form module that may be causing that?
 
K

Kevin McCartney

sadly, no ... most definately not in the Access application but when Internet
Explorer opens on the work PC a VB script is executed (to check to see if I
have permission to open the application, I think), so perhaps there is
something in the VB script that is stuffing it up, most likely.

Thank you for your help
 
K

Kevin McCartney

The only bit of code in my database is on form1 where I have one list box
obtject.

No changes have been made to the form after selecting to a new form to a new
database.

The changes made to list box (list0) is that I've changed the Row Source
Type to Value List and I changed the Multi Select to Extended.

Place this code in module

Option Compare Database

Private Sub Form_Load()

Dim Z As Integer

For Z = 0 To 9
Me.List0.AddItem "ITEM " & Z, Z
Next Z

End Sub

Saved the form, opened it, selected all items in the list, opened Internet
Explorer and all items are then not selected.

hmmmmm.... mystery :)

Thanks anyway
 
K

Kevin McCartney

Hi Dave Hargis, Microsoft Access MVP

you'll never gues what causes it. Through trial and error with internet
explorer, I set the default page not to the corporate website and set it
'Blank' and gues what it doesn't update the list, YEAH !

if I select the corporate web site it clears the list.

Thanks again
 
K

Kevin McCartney

In fact if i go to any website the list is updated, and if I have the code
running but stopped by a break point I get the message,

'This expression is typed incorrectly, or it is too complex to be evaluated.
For example, a numeric expression may contain too many complicated elements.
Try simplifying the expression by assigning parts of the expression to
variable.'

press CTRL+BREAK does take me to any code, so I'm still at a loss at to what
causes it or what is reacting to a web page being loaded.

Thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top