Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You're welcome. FYI, since it appears that this is being executed from the [Asset Details] form, you can bypass the Forms commection and just reference the controls directly:


    =DMax("PMEventUsage","PMEvents","AssetID = " & Me.AssetID)+DLookUp("PMInterval","AssetCategories","AssetCat ID = " & Me.AssetCatID)-DMax("Usage","AssetUsage","AssetID = " & Me.AssetID)

  2. #17
    10 Gauge's Avatar
    10 Gauge is offline Getting the hang of it...
    Windows XP Access 2007
    Join Date
    Feb 2011
    Location
    Fredericksburg, VA
    Posts
    202
    Alright, I'll do that to clean up the code a bit. Thx again!

    Do you mind taking a look @ this thread: https://www.accessforums.net/forms/h...orm-11983.html

    I can't figure that one out either. TIA.

    EDIT: After changing the string to use Me.*** it's not working anymore, just displaying #Name in the box. ?? I double checked the spelling and it all looks right.

  3. #18
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You should really take the time and give your controls names more descriptive than Text123. Maintaining this months or years later can be problematic.

  4. #19
    10 Gauge's Avatar
    10 Gauge is offline Getting the hang of it...
    Windows XP Access 2007
    Join Date
    Feb 2011
    Location
    Fredericksburg, VA
    Posts
    202
    Quote Originally Posted by RuralGuy View Post
    You should really take the time and give your controls names more descriptive than Text123. Maintaining this months or years later can be problematic.
    Already done, I realized that as I was writing the VB and changed it to a better descriptor of "PMCountdown".

    Please see my edit above ^^^

  5. #20
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by 10 Gauge View Post
    EDIT: After changing the string to use Me.*** it's not working anymore, just displaying #Name in the box. ?? I double checked the spelling and it all looks right.
    Did you use the names of the Controls or the fields? Did intellisense pop up the names to choose from when you added the . to Me?

  6. #21
    10 Gauge's Avatar
    10 Gauge is offline Getting the hang of it...
    Windows XP Access 2007
    Join Date
    Feb 2011
    Location
    Fredericksburg, VA
    Posts
    202
    I used the names of the controls on the form. Intellisense doesn't pop up for me unless I'm in Code Builder, is there a way to turn it on for editing in the properties field?

  7. #22
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I'm not sure what is going on so for expediency just go back to referencing through the Forms collection that worked.

  8. #23
    10 Gauge's Avatar
    10 Gauge is offline Getting the hang of it...
    Windows XP Access 2007
    Join Date
    Feb 2011
    Location
    Fredericksburg, VA
    Posts
    202
    10-4!

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

Similar Threads

  1. Master/Child between Subforms
    By Pilotwings_64 in forum Forms
    Replies: 3
    Last Post: 08-22-2010, 01:45 AM
  2. position multiple subforms
    By Mclaren in forum Programming
    Replies: 1
    Last Post: 07-12-2010, 08:52 AM
  3. Replies: 1
    Last Post: 02-03-2010, 08:17 AM
  4. Replies: 0
    Last Post: 12-16-2009, 01:14 PM
  5. Display and Empower Multiple Subforms
    By Schwagr in forum Forms
    Replies: 2
    Last Post: 03-28-2006, 03:51 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