Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    kboldin is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2022
    Posts
    6

    vba controls missing?


    Having a little issue with missing properties between work and home, both are the same access version from office 365. I think I'm missing a setting or reference but I've been looking and can't find it. I'm using a combo box selection to auto populate a form to automate redundant data entries. Anyway, my code wasn't working that I've written many times before, that's when I noticed the difference when troubleshooting. At home, I only get the value of my Me.product_id where at work I get many other property option. At home I get a compile error because it can't find "column". Seems like a setting that I'm not aware of, thanks for any advise in advance.

    Click image for larger version. 

Name:	property.jpg 
Views:	31 
Size:	169.8 KB 
ID:	48106

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,896
    Compare the library references selected in each.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    kboldin is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2022
    Posts
    6
    I did, verified they are the same.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,896
    Well, that sucks! I am not aware of any other setting that would cause this. Sorry, I don't use 365. Is there another home computer running 365 you could test with?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    kboldin is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2022
    Posts
    6
    I do, I'm going to test in the morning when she goes to work Appreciate the help though!

  6. #6
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,411
    in your work version the control is called cboloanappid, the home version the control is apparently called product_id - which implies a field name, not the name of a control. Further the function is called prod_id_change which implies the name of the control is prod_id.

    In summary - are you sure you have the correct name for the combo control

  7. #7
    kboldin is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2022
    Posts
    6
    Quote Originally Posted by Ajax View Post
    in your work version the control is called cboloanappid, the home version the control is apparently called product_id - which implies a field name, not the name of a control. Further the function is called prod_id_change which implies the name of the control is prod_id.

    In summary - are you sure you have the correct name for the combo control
    Yes, those are examples. The work is an actual Db is use, the home is a test file to see if could find out what's going on.

  8. #8
    kboldin is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2022
    Posts
    6
    I tested on another machine, same issue. Both machines share the same Office 365 license. We are on an annual subscription, don't think its a lesser version but I may be mistaken. This has helped to walk through the issue, appreciate the input. Any other idea's let me know!

  9. #9
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,411
    So to be clear, your combo is called product_id and prod_id is a different control where you are running this code

  10. #10
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,651
    Try adding Option Explicit to all your modules and see if your code compiles.
    Your picture indicates its not there.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  11. #11
    kboldin is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2022
    Posts
    6
    To be clear, I'm an idiot.... PEBKAC strikes again. The control was wrong and I had to relearn a lesson from long ago. I don't believe Access likes the underscore naming convention. I write way more sql these days and havea habbit of using underscore for nearly every field. E.g. Product_id, prod_id etc.. When running a private sub in Access I don't believe Access knows what to do with Product_id_Change because of the double underscore, where ProductId_Change works like a champ. I do appreciate all the help, not sure why I went down the road I went LOL! Anyway PEBKAC!!! Click image for larger version. 

Name:	pebkac.JPG 
Views:	20 
Size:	61.7 KB 
ID:	48112

  12. #12
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,651
    I don't believe Access likes the underscore naming convention.
    When running a private sub in Access I don't believe Access knows what to do with Product_id_Change because of the double underscore,
    Not sure that's the problem.

    Just tested with a combo named C_b_o_some_Combo and works as expected.

    btw, Afterupdate is probably the more appropriate event for a combobox. If someone were to type in the combobox it would fire the onchange event.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  13. #13
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,411
    Think the issue is not with the underscore per se. More to do with spaces in field/control names. Vba will replace a space with an underscore.

    Personally I avoid underscores anyway -,they make long sql statements hard on my eyes. I prefer camel case

  14. #14
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,651
    I prefer camel case
    I'm with you there. The only problem is it carries over to my handwriting and non-coding typing too.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  15. #15
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,784
    Personally I avoid underscores anyway -,they make long sql statements hard on my eyes. I prefer camel case
    Another vote for camel case. Also, IMO it's best to use a less ambiguous naming convention. ALL my form controls are prefixed per type (e.g. cmb is combo) so there's never any doubt if a reference is a control or not. FWIW, .Value isn't even required as it's the default property of all (?) controls.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 5
    Last Post: 08-11-2020, 08:19 PM
  2. Using Tab Controls
    By NadiaWilkes in forum Programming
    Replies: 7
    Last Post: 02-14-2020, 06:07 PM
  3. Replies: 3
    Last Post: 04-29-2017, 12:09 PM
  4. Using Tab controls within a form
    By crowegreg in forum Forms
    Replies: 2
    Last Post: 08-25-2011, 08:17 PM
  5. Tab Controls
    By karlhardeman in forum Forms
    Replies: 10
    Last Post: 08-25-2010, 07:01 AM

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