Results 1 to 5 of 5
  1. #1
    MalmMSP is offline Novice
    Windows 8 Access 2016
    Join Date
    Jan 2018
    Posts
    3

    Where Condition Error Using Macro Builder

    Using macro builder to open a report "rptLotList" that is generated through a query "qryLotList" starting from another report "rptPOList" that is filtered by a user on-click event of a PurchaseOrder.ID record in the rptPOList report.





    Where condition below in macro builder gives me an error of: Invalid bracketing of name '[Reports]![rptLotList]![PurchaseOrder.ID]'.



    [PurchaseOrder.ID] = [Reports]![rptLotList]![PurchaseOrder.ID]



    Please help.



    Thanks

  2. #2
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,388
    I would try:
    Code:
    [PurchaseOrder].[ID] = [Reports]![rptLotList]![PurchaseOrder].[ID]

  3. #3
    MalmMSP is offline Novice
    Windows 8 Access 2016
    Join Date
    Jan 2018
    Posts
    3
    Access dialog box asks me to enter: Reports!rptLotList!PurchaseOrder.ID

    Note: Lot list is the report to be generated.

  4. #4
    MalmMSP is offline Novice
    Windows 8 Access 2016
    Join Date
    Jan 2018
    Posts
    3
    Now no bracket error anymore and opens rptLotList, but also instead of filtering results, the rptLotList report displays nothing. Note that rptLotList is being populated by a query qryLotList.Also, I changed the right side of the where condition's report to the original rptPOList see below:
    [PurchaseOrder].[ID]=[Reports]![rptPOList]![PurchaseOrder].[ID]
    Any thoughts?

  5. #5
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    This is a different problem now? Your last post reads like it's a parameter prompt, which means Access doesn't know what Reports!rptLotList!PurchaseOrder.ID is. If that value is coming from the 1st report, that report must remain open at that time. The cause can be one of several, such as the report or object being referenced is not available (as mentioned), a report control that is non existent or is misspelled, or the query design is incorrect. Try running the query for the 2nd report itself and see if that works with those suggestions in mind.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 3
    Last Post: 08-19-2014, 09:07 AM
  2. Macro Builder and Code Builder
    By data808 in forum Macros
    Replies: 2
    Last Post: 01-12-2014, 11:28 AM
  3. I want to use the macro builder!
    By opopanax666 in forum Access
    Replies: 5
    Last Post: 11-29-2012, 10:18 AM
  4. Expression Builder in Data Macro
    By Korreia in forum Access
    Replies: 5
    Last Post: 11-14-2012, 05:16 PM
  5. Run Query in Macro Builder
    By chewbears in forum Queries
    Replies: 0
    Last Post: 11-21-2011, 09:18 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