Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    ahmed_one is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2015
    Posts
    10

    ListView Control (ActiveX) in Ms.Access Form

    Dear Experts,




    Hi to All,


    Recently I've been working with my friend on a Access project require some upgrade. In one of forms I've used ListView Active X control, the reason was that it looks good, add a professional look and most of all we have good control over it to fill data or to set column headers etc. The file is in 2003 compatible due to some users still have Office 2003.


    All went very well, until I've sent the Ms.Access file to my friend for testing, then comes the worse part, at the start of file got error something like Active X control not properly registered. I've sent a link to VB controls file which could be downloaded from MS site, and do the un-register then again register the control mscomctl.ocx. After that atleast 2 out of 3 forms work fine, but one form still shows error regarding MouseMove event:

    "The expression MouseMove you entered as the event property setting produced the following error: There was an error loading an ActiveX control on one of your forms or reports"



    And funny thing is there is no MouseMove event use in all forms with ListView control.



    So long story short I have to replace ListView with traditional listbox of Ms.Access. The reason for posting this to the forum is to know is there any workaround available so that if we distribute our application using ListView to clients, they don't have to go through all file downloading and do the regsvr32 mscomctl.ocx type stuff? Can we some how distribute ActiveX controls alongwith Ms.Access application, and all settings can be done via VBA coding so that at startup Ms.Access should check whether there is any problem with ActiveX control, and fix it?


    I am already working on another application, this is an Accounting Software and I am already use many ListViews, so you can understand my concern :|


    Looking forward for expert suggestions/solutions as always.


    regards

    Ahmed

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Are you talking about treeview controls? If you can provide a sample database with some garbage data in it we might be able to let you preserve the treeview control rather than reworking the whole database.

  3. #3
    ahmed_one is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2015
    Posts
    10
    Thanks for your reply, No I am talking about ListView Control. Of course I can provide sample DB, but how can I attached file? there is no file attachment option here.

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    click the 'go advanced' button at the bottom of the screen below your posting area.

    Just make sure you only include the elements you are having trouble with and zip the file up, don't try to upload the database without zipping please.

  5. #5
    ahmed_one is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2015
    Posts
    10

    ListView Control (ActiveX) in Ms.Access Form

    Thanks again for guiding me...Now I can attached sample DB for your review. Please check..

    Regards

    Ahmed
    Attached Files Attached Files

  6. #6
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Ok I assume we're talking about the form frmsearchproduct, I'm also assuming you have other functionality attached to this list box like resorting if you click a column header (otherwise why bother with a listview control at all) but I can't replicate the problem with the mousemove error. Can you tell me exactly what your tester is doing to encounter the error?

  7. #7
    ahmed_one is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2015
    Posts
    10
    Yes frmSrchProduct has ListView control in it, and when form load, list is populated with data from Query (qryProductSrch). The problem encounter is not on my machine, as mentioned in my original post it was my friend's PC where forms with ListView controls show following:

    "The expression MouseMove you entered as the event property setting produced the following error: There was an error loading an ActiveX control on one of your forms or reports"

    And there is no MouseMove event used, I've also tried register/Unregister mscomctl.ocx but no use.

  8. #8
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    That's exactly what you posted before but it doesn't answer my question

    WHAT IS HE DOING TO GET THAT ERROR?

    Is he just opening the form?
    Is he clicking a button?
    Is he clicking the listview control?

    I get an error when I shut down the database, then re-open it and open the form in question but and the reference to the common items is missing (on my machine) but the form still functions with the code you have in it. probably because you have two references to basically the same set of commands (common controls) and one of the ocx files is not present on my machine I assume you're doing this for redundancy, you can suppress this error by setting the warnings in your formload event

    Code:
    Private Sub Form_Load()
    DoCmd.SetWarnings False
    Call FillProducts(False, "", "", "")
    DoCmd.SetWarnings True
    End Sub
    comctl32.ocx is the older version
    MSComctl.ocx is the newer version


    Can you pinpoint in your code (maybe remove the error handling from the code and let it bomb out) where the problem is occurring on your friend's computer?

  9. #9
    ahmed_one is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2015
    Posts
    10
    He is getting the error when:

    He is opening the Access file.
    And when he open the form.

  10. #10
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    What about the rest of it...

  11. #11
    ahmed_one is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2015
    Posts
    10
    Sorry I didn't understand what you mean by rest of it?

  12. #12
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Can you pinpoint in your code (maybe remove the error handling from the code and let it bomb out) where the problem is occurring on your friend's computer?
    I can not replicate your problem so you need to identify where exactly in your code the problem is occurring you can do this either by removing the error handling or putting debug.print commands after every line of code that is used in your form load or form open event (including the functions you're using)

  13. #13
    ahmed_one is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2015
    Posts
    10
    Dear there is no error in code, so I cannot pinpoint any specific part of code. The problem is the ActiveX control which is not working in some PC. Which is exactly the purpose of posting, to get any idea/suggestion about how to get the ListView control in those PC which is currently not supporting it.

    The user when open the Access file he gets error box and after clicking OK if he open any form with ListView control he gets same error:

    "The expression MouseMove you entered as the event property setting produced the following error: There was an error loading an ActiveX control on one of your forms or reports"

    is pointing towards MouseMove event which I did not use in any of my code. That is the reason I am unable to pinpoint any part of code.

  14. #14
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    ... There is an error in the code WHEN IT RUNS ON YOUR FRIEND'S COMPUTER... or you wouldn't have posted here. The error is not pointing towards a 'mousemove' PROPERTY, your individual lines of code are breaking down somewhere. I don't have your database handy but as I recall there's a short set of code running in the ON OPEN or ON LOAD event of the form which is kicking off at least 1 other function, somewhere in that function the code is breaking down WHEN IT RUNS ON YOUR FRIEND'S COMPUTER. If you remove error handling the code should bomb out on the line it doesn't like and we can go from there.

    You are getting hung up on the MOUSEMOVE PROPERTY (there is none in access), you need to identify the exact line of code that is causing the problem.

  15. #15
    ahmed_one is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2015
    Posts
    10
    I've removed the error handler code from Form Loan event, and send the file to my friend. Again the result was same, on Startup it again shows same MouseMove error and form is shown without ListView. If there was any error in code, it surely shows up at my pc or any other PC I've tested. In form Load event it just call a FillProducts Procedure which populates the data from qryProductSrch based on criterias passes as parameters.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. loading an ActiveX control error
    By AeroProDrive in forum Access
    Replies: 3
    Last Post: 10-01-2014, 12:52 PM
  2. How to register an ActiveX control
    By gstylianou in forum Access
    Replies: 6
    Last Post: 06-17-2014, 08:17 AM
  3. Replies: 5
    Last Post: 02-06-2014, 09:10 AM
  4. activex control (ado data control)
    By metokushika in forum Access
    Replies: 4
    Last Post: 11-07-2011, 12:45 AM
  5. Replies: 5
    Last Post: 12-27-2010, 06:59 PM

Tags for this Thread

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