Results 1 to 8 of 8

microsoft access error the object doesn't contain the automation object in macros

  1. #1
    ahuffman24 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    75

    microsoft access error the object doesn't contain the automation object in macros

    Hi,



    I am trying to use macros with a button that opens a form called "Static Casting Inspection" displaying 6 fields from a table. I also have a subform in Static Casting Inspection that can be edited by the user. I need the 6 fields to be displaying a t the top, so in macros I have put multiple "where" conditions to display those 6 fields. Here is what I have typed in macros:

    ="[Order_Number]=" & [Order_Number] & " AND [Item_Number]=" & [Item_Number] & " AND [Pattern_Number]=" & [Pattern_Number] & " AND [Description]=" & [Description] & " AND [Customer_Name]=" & [Customer_Name] & " AND [Analysis]='" & [Analysis] & "'"


    But, when I click on the button, I get this error: Click image for larger version. 

Name:	error.png 
Views:	16 
Size:	13.5 KB 
ID:	38473


    If I delete Pattern_Number from the macros, I get the same error but for 'Description'. Did I type something in incorrectly, or should I be typing this in elsewhere?

    thanks!

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,323
    Why not just base your subform a query with the criteria you want instead of trying to apply a filter (which is what I think you're trying to accomplish)?

  3. #3
    ahuffman24 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    75
    Here is a screenshot of what the form looks like. I want the top 6 fields automatically filled in from my table, and in the subform, the serial number and heat number fields will also be automatically filled in. Everything else in the subform will be entered by the user. Is there a better approach to this?

    Click image for larger version. 

Name:	Annotation 2019-05-22 113647.png 
Views:	14 
Size:	43.4 KB 
ID:	38474

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,323
    'automatically filled' doesn't really say anything. We have no idea what your table structure is or how this is relevant to your process. Is this a function of an order, as in every time an order is generated you perform an inspection on the items ordered. What is actually supposed to happen with all this 'automatically'.

    Can you post a sample database with some junk data in it to at least give us a starting point? just looking at screenshots will not generally be helpful.

  5. #5
    ahuffman24 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    75
    how do I post a database in a thread?

  6. #6
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,323
    create a copy of your database, take out anything you'd consider private but leave something in there that can replicate your problem, then compact/repair the database, zip it up and click the GO ADVANCED button on the lower right corner of your posting window, then click the paper clip which will bring up a self explanatory menu to upload files and attach them to your post.

  7. #7
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    5,754
    Quote Originally Posted by ahuffman24 View Post
    how do I post a database in a thread?
    https://www.accessforums.net/showthread.php?t=70301
    - "doesn't work" is no help. Post err msgs and where.
    - Use code tags for code/sql. Implement changes in copies of your database.
    Sometimes I talk to myself - like when I need expert advice.

  8. #8
    ahuffman24 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    75
    Hi all,

    I have figured out a different way to accomplish my task, but if I have any other questions related to this issue I will post on here. I appreciate your help!

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

Similar Threads

  1. Replies: 2
    Last Post: 07-20-2017, 07:20 AM
  2. Replies: 7
    Last Post: 07-10-2015, 01:02 PM
  3. Replies: 1
    Last Post: 12-27-2013, 01:59 PM
  4. Replies: 1
    Last Post: 07-02-2013, 08:41 AM
  5. Replies: 3
    Last Post: 11-02-2010, 10:14 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
  •  
Tech Forums: Microsoft Office Forums