Page 2 of 2 FirstFirst 12
Results 16 to 26 of 26
  1. #16
    DzuB is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Nov 2018
    Posts
    12
    I receive the database in a folder that has locator photos, goe coordinates and information from previous home inspections. I am trying to add current photos of homes I have inspected. I'm guessing that the only applicable thing in that folder is a folder named TandeM. This is where I put the pictures that are called up when I attach them. Having said that, I suspect it doesn't really matter where the folder is or what it's called because I've had success pulling pictures from a folder on the desktop named something different. I hope that helps.

  2. #17
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,645
    Okay, might have something. Form is bound to table that has fields Filename1, Filename2, etc. But the code is expecting textboxes with those names. I change Me.Filename1 to Me!Filename1 and the error goes away.

    The error triggers whether or not Option Explicit is used. Changing from . to ! and no longer get error on those references but others will have same issue, such as [RoofText]. No such field or textbox by that name, there is RoofOtherText - fix code. There are more where there is a field but no corresponding textbox on form.

    Option Explicit should be in every code module but including at this time will not help fix this issue.

    Going to have to learn some VBA to upgrade this code. The . will provoke intellisense popup tips as you type code. So behind the form as you type Me. you will get a popup list of properties and controls associated with the form. Type Me.RoofOtherText. and you will get popup list of properties associated with that control. Whereas Me!RoofOtherText references the field.

    There is a bunch of procedures like:
    Code:
    Private Sub HideComm()
    [ComboRoof].Enabled = False
    [RoofOtherText].Enabled = False
    [ComboFloors].Enabled = False
    [FloorsText].Enabled = False
    [ComboMasonry].Enabled = False
    [WallsMText].Enabled = False
    [ComboFrame].Enabled = False
    [WallsFText].Enabled = False
    End Sub
    To take advantage of the . intellisense, revise code as:
    Code:
    Private Sub HideComm()
    With Me
    .[ComboRoof].Enabled = False
    .[RoofOtherText].Enabled = False
    .[ComboFloors].Enabled = False
    .[FloorsText].Enabled = False
    .[ComboMasonry].Enabled = False
    .[WallsMText].Enabled = False
    .[ComboFrame].Enabled = False
    .[WallsFText].Enabled = False
    End With
    End Sub
    Since there is no textbox named [FloorsText], this line will still error because Enabled is property of textbox (and other controls) but not field.

    The use of [ ] are not really needed since naming convention does not use spaces nor punctuation/special characters (underscore is only exception to this restriction) nor reserved words, however, they should not interfere.

    It's still a mystery why this does not error for other users. Are you positive you have the same db?
    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. #18
    DzuB is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Nov 2018
    Posts
    12
    In theory everyone gets the same database. I'll try to get one of the other guys to send me their copy and see if there is any difference. I might be able to get it tomorrow. In the meantime I will play around with some of the things you changed.

  4. #19
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    Quote Originally Posted by June7 View Post
    I have never seen Let in any code. Remove it.
    I'm curious. You haven't seen Let? What about Get?

  5. #20
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,645
    Perhaps I should have qualified that - not in any VBA.
    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.

  6. #21
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,127
    Let & Get are often used for properties in class modules. For example, this is from a class module used to create system alerts (balloon tooltips):

    Code:
    Public Property Get Icon() As btIcon    
        Icon = mlngIcon
    End Property
    
    
    Public Property Let Icon(ByVal lngIcon As btIcon)
        mlngIcon = lngIcon
    End Property
    
    
    Public Property Get Heading() As String
        Heading = mstrHeading
    End Property
    
    
    Public Property Let Heading(ByVal strHeading As String)
        mstrHeading = strHeading
    End Property
    
    
    Public Property Get Message() As String
        Message = mstrMessage
    End Property
    
    
    Public Property Let Message(ByVal strMessage As String)
        mstrMessage = strMessage
    End Property
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  7. #22
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    I took for granted that you meant vba. Colin said it best.

  8. #23
    DzuB is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Nov 2018
    Posts
    12
    I have finally heard from the company that gave me this program to use and they said that it will not work with Access 2010. Supposedly if they were going to make it compatible it would take rewriting millions of lines of code which is funny because I doubt it has anywhere close to a million lines of code in it. Be that as it may, I'm going to get Access 2007 so I can perform this work. Thanks June7 for all your excellent help on this I really appreciate it!!!

  9. #24
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,127
    Quote Originally Posted by DzuB View Post
    I have finally heard from the company that gave me this program to use and they said that it will not work with Access 2010. Supposedly if they were going to make it compatible it would take rewriting millions of lines of code which is funny because I doubt it has anywhere close to a million lines of code in it. Be that as it may, I'm going to get Access 2007 so I can perform this work. Thanks June7 for all your excellent help on this I really appreciate it!!!
    I can't think of any features in a database that would allow it to run in Access 2007 but not in Access 2010 (though the same isn't true in reverse)
    Your database certainly doesn't contain a million lines of code. Probably far less than 10000.
    It does however contain several basic code errors. It doesn't require variable declaration and it doesn't compile.
    Sounds to me like your programmer isn't very good and just can't be bothered.

    I opened it ok in 2010. Haven't seen your error 2114 but I haven't looked at it in detail.

    If you buy Office 2007 do bear in mind its no longer supported.
    I think you could get someone to fix this relatively cheaply to run in 2010 if you ask around
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  10. #25
    DzuB is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Nov 2018
    Posts
    12
    Yeah, that all sounds right to me! Fortunately, I was able to get a very cheap copy of Access 2007 and I am finally up and running. Thanks for your suggestions and I will definitely keep them in mind if I have any more trouble.

  11. #26
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,127
    Good luck.
    Strongly recommend you fix the compile issues that several of us have mentioned as an urgent priority.
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

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

Similar Threads

  1. Replies: 2
    Last Post: 01-04-2016, 09:40 AM
  2. Replies: 11
    Last Post: 05-01-2014, 11:56 AM
  3. Replies: 3
    Last Post: 01-23-2014, 07:49 AM
  4. Replies: 0
    Last Post: 07-16-2012, 05:42 AM
  5. Replies: 6
    Last Post: 05-30-2012, 12:32 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