0

OBJECTIVE

Create a dashboard for the Marketing team to pull in product information (e.g product, customer, inventory, sales forecasts, etc.) for further analysis.

APPROACH

  1. Access Product, Inventory, and Sales databases.
  2. Create Query to join Product, Inventory, and Sales details.
  3. Create a simple UI for the Marketing team to interact with queried results.

CODE

simple script for the Marketing team to review a table, prior to query execution

Public Sub reviewCatalog()
DoCmd.OpenTable "Table - Active Customer Catalog", acViewNormal
DoCmd.OpenTable "Table - Active Product Catalog", acViewNormal
End Sub

call reviewCatalog() script from a button OnClick() event that is presented in a simple UI/Form

Public Sub reviewCatalog_Click()
Call reviewCatalog.reviewCatalog
End Sub

ERROR

Compile Error: Methor or data member not found

NOTES

  • When the macro is run independently of a button click, the script runs without error.
  • I've confirmed that the button assigned to the macro (called "reviewCatalog") is handling an "Event Procedure" for an OnClick event.

QUESTIONS

  1. What is the nature of the error being thrown? Why is it only occuring on the reviewCatalog_onClick() event (as opposed to other, similar buttons & scripts)?

1 Answer 1

1

Nevermind, I am a dummy.

Due to the similar naming convention of the button name and the macro, MS Access was throwing an error.

I've updated the button name to "reviewCatalogs" (from "reviewCatalog"). After updating the button name and the Public Sub to Public Sub reviewCatalogs_Click(), the script worked.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.