Results 1 to 9 of 9
  1. #1
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2002
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    Filtered Macro Not Referencing Form Using Tabbed Menu

    I am using a tabbed menu system with Menu as the name of my Master (page,i.e. Menu)
    Main form is named OrderDetails and I have a Unbound Combo on it that uses the macro On Change
    Here is the On Change Event Statement: Add an Order and Details Macros.Filter : On Change
    It is having a problem referencing the form because of my page I guess.
    Name of Main Page is Order Entry
    How can I reference the form/page or whatever so that my code will work?
    I tried adding Menu to the code;
    [Forms]![Menu]![OrderDetails]![Filter]="Today" ' This did not work.
    Attached Thumbnails Attached Thumbnails Filter On Change.jpg  

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Don't understand, you are using a tab control? There is no need to reference the tab control.

    If this is a navigation form, then the issue is entirely different.
    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
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    I inserted pages and then inserted my forms into these.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What do you mean by 'pages'? Pages of a tab control or a navigation form?

    Again, if this a tab control then refer to subform normally, the tab control is irrelevant. I always name subform container control different from the object it holds, like ctrDetailes. If the code is behind main form, then:
    Forms!mainformname!ctrDetails.Form!controlname
    or
    Fomrs!mainformname!ctrDetails!fieldname

    However, a navigation form is different. Navigation forms confuse me. As do macros - I use only 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.

  5. #5
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    I created a Blank Form, inserted pages and then inserted my forms into these. So I have a tabbed menu style look. Us mere mortals have to resort to such when pour vba skills suck.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I still don't know what you mean by 'pages'. VBA has nothing to do with this. If you want to provide db for analysis, follow instructions at bottom of my post.
    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.

  7. #7
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    Database Provided For Analysis

    OK, here is a scaled down version.Hopefully you can give me some direction.Instructions is on form (Main Form) OrderDetails.
    Attached Files Attached Files

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    There is no tab control, no navigation form and therefore no 'pages'. Now that that is answered...

    Note on the form states: I am trying to make the subform subtract items from the Products table.

    If that's what you want the update query to do, it is a mess. It isn't updating Products, it updates OrderDetails. Modifying the Inventory field in Products table would be:
    UPDATE Products SET Products.Inventory = [Inventory]-[Forms]![OrderDetailsSubform]![Quantity]
    WHERE (((Products.ProductID)=[Forms]![OrderDetailsSubform]![ProductID]));

    BTW, saving aggregate data like this is usually a bad idea. The summary values are 'disconnected' from the raw data, audit trail is broken, and errors are hard to determine and fix. Ideally, raw data as transactions of inventory purchased/sold would be saved and aggregate data would be calculated 'on-the-fly' when needed.
    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.

  9. #9
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    I don't even understand what you said.However I know the query was messed up. I have since got it figured out. I have also abandoned the Tabs feature.

    I thank you for your hard work.
    I am trying to finish just one feature of the db at a time. Since this is the Customer Feature, i.e. subtracting inventory. So your saying my approach is bad. Everything is on one form and the only thing I have to implement is the code feature. Next comes the inventory feature, then the invoicing feature. I don't know of another way since I am at my code limit and way past my skill level, of this I am well aware. Still, I will struggle along as best I can.
    Thanks Again.

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

Similar Threads

  1. Replies: 0
    Last Post: 09-25-2012, 09:16 AM
  2. Replies: 2
    Last Post: 09-13-2012, 12:25 PM
  3. How to run macro on filtered dataset
    By FredLanger in forum Forms
    Replies: 7
    Last Post: 04-02-2012, 12:27 PM
  4. Tabbed form
    By leftylee in forum Forms
    Replies: 6
    Last Post: 03-14-2011, 12:45 AM
  5. can a tabbed form be too big? Help!
    By ma t in forum Forms
    Replies: 3
    Last Post: 03-10-2011, 10:03 AM

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