Results 1 to 5 of 5
  1. #1
    jheintz57 is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    28

    Run-time error 438 on ActiveX Imagelist control

    I have a Microsoft Imagelist Control in one of my forms (well in a few of them actually but this error only pops up in one) and the code it take me to is below. Why it moves to the second item in the list...the non-harzardous waste", 10 one....versus targeting the first I am not sure. Research is leading me to believe it is a Windows problem and not an access but I though I would ask anyway. Any insight is always appreciated.



    Code:
    Private Sub Form_Load()
    
    
    ImageCombo3.ComboItems.Add , , "Hazardous Waste", 1  'Image List Image Index
    ImageCombo3.ComboItems.Add , , "Non-hazardous Waste", 10 'Image List Image Index
    ImageCombo3.ComboItems.Add , , "Non-RCRA Regulated Waste", 11 'Image List Image Index
    ImageCombo3.ComboItems.Add , , "PCBs", 12 'Image List Image Index
    ImageCombo3.ComboItems.Add , , "Certified PCBs", 6 'Image List Image Index
    ImageCombo3.ComboItems.Add , , "No PCBs", 9 'Image List Image Index
    ImageCombo3.ComboItems.Add , , "Universal Waste", 3 'Image List Image Index
    ImageCombo3.ComboItems.Add , , "Categorized Universal Waste", 2 'Image List Image Index
    ImageCombo3.ComboItems.Add , , "Solid Waste", 13 'Image List Image Index
    ImageCombo3.ComboItems.Add , , "Special Waste", 14 'Image List Image Index
    ImageCombo3.ComboItems.Add , , "Triple Rinsed", 15 'Image List Image Index
    ImageCombo3.ComboItems.Add , , "Used Batteries", 4 'Image List Image Index
    ImageCombo3.ComboItems.Add , , "Used Oil", 5 'Image List Image Index
    ImageCombo3.ComboItems.Add , , "Marine Pollutant", 8 'Image List Image Index
    ImageCombo3.ComboItems.Add , , "Empty", 7 'Image List Image Index
    Thanks.

  2. #2
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    What happens if you just add a 1st line such as:

    ImageCombo3.ComboItems.Add , , "", 0 'Image List Image Index

  3. #3
    jheintz57 is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    28
    It merely goes to the first line of the code instead. I tried adding another line just like it and again it goes to the first line of code with information in it. So always the "hazardous waste" item.

  4. #4
    jheintz57 is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    28
    But...the form is actually a subform and when opened alone, I don't get the message. So I figure it must be something to do with the connection between forms?

  5. #5
    jheintz57 is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    28
    It only gives the error when there is not a record already present...ie when we are adding a new record. The form is part of a tab control on the parent form and one of the other tabs updates that same record just a different field...could this be causing the problem?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Control Source for Text Box (#error)
    By km8415 in forum Forms
    Replies: 3
    Last Post: 06-27-2010, 10:45 AM
  2. Setting a Color on a Control For Error
    By AccessLes in forum Programming
    Replies: 6
    Last Post: 06-16-2010, 12:35 PM
  3. Replies: 0
    Last Post: 10-20-2009, 01:10 PM
  4. ActiveX componet can't create object
    By quanmay35 in forum Access
    Replies: 1
    Last Post: 05-26-2009, 05:27 AM
  5. Visual Basic ToolBar and ImageList
    By Athanasopolous in forum Programming
    Replies: 0
    Last Post: 01-17-2006, 03:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums