Results 1 to 5 of 5
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    1,919

    Me.DOExp - Method or data member not found

    I have a statement that produces as error when VBA is compiled while in Debug. I thought perhaps I had a corrupted control, so I deleted the control and built a new one from the tools menu, but I still get the error. I don't get any compilation errors when I "Compress & Repair". And, the Conditional Formatting functions normally when the value is tested during normal form display.

    Sometimes one can get into problems if the ControlSource name is the same as the control name, but that's not the case here. Any ideas what might be going on here?


    The error:
    Click image for larger version. 

Name:	A1.jpg 
Views:	11 
Size:	43.6 KB 
ID:	23657

    The Control:
    Click image for larger version. 

Name:	A2.jpg 
Views:	10 
Size:	66.1 KB 
ID:	23658



    The form's RecordSource query:
    Click image for larger version. 

Name:	A3.jpg 
Views:	10 
Size:	25.7 KB 
ID:	23659

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    According to your picture, the field "DOExp" is bound to the control "tbDOExp".

    Try changing the line to reference the control name:
    Code:
    curExpiration = Me.tbDOExp
    Is "curExpiration" a control on the form? Curious because I do not see where "curAmount" or "curExpiration" was declared in "Sub tbAmtPmt".

  3. #3
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    1,919
    Wow! I'm not thinking at all today............SIGH!

    Code should be:
    Code:
    curAmount = Me.tbAmtPmt
    curExpiration = Me.tbDOExp
    curAmount and curExpiration are both global to the module.

    Thanks,
    Bill

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Glad you have it working.

    I use the prefix "g" or "g_" for globally declared variables (depending in the phase of the moon).
    Don't know *why* I expect everyone to follow my naming convention. I mean, ell, why wouldn't you???

  5. #5
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    1,919
    Steve,

    I use gblxxxxxxxxx but only when the variables are dim'd in a module dedicated to an assortment of global variables needed throughout an app. Typically, you'll see a module within my apps like ModGlobalVars for such purposes.

    Thanks for waking me up earlier,
    Bill

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

Similar Threads

  1. Method or data member not found
    By hendrikbez in forum Access
    Replies: 2
    Last Post: 11-21-2014, 10:52 AM
  2. Method or Data Member not found
    By johnnyBQue in forum Programming
    Replies: 4
    Last Post: 11-03-2014, 07:15 AM
  3. Method or Data member not found error
    By junwatts in forum Access
    Replies: 1
    Last Post: 09-27-2013, 08:49 AM
  4. Method or data member not found
    By papa yaw in forum Programming
    Replies: 5
    Last Post: 12-17-2012, 02:19 PM
  5. Compile Error: Method or data member not found
    By subtilty in forum Programming
    Replies: 5
    Last Post: 02-09-2012, 07:56 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