[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to resolve the error: The macro (or its macro group) doesn't exist, or the macro is new but hasn't been saved ?

Posted on 2006-03-19
6
Medium Priority
?
884 Views
Last Modified: 2012-06-21
I have 2 combo boxes and the user inputs values into them.

cmbOffice RowSource = SELELCT DISTINCT LEFT([Acct Number],4) as officenumber from tblSpACS order by LEFT([Acct Number],4)

The user then Clicks on a Command button and the OnClick event performs the following:

If Len(cmbOffice) = 4 Then
       strSQL = "INSERT INTO tblExACS SELECT [Acct Number], Null As [Exclude], " & _
       "[Share Amt], [Prop CD], [User 1], Null As [User Name], Null As [DateChanged] " & _
       "from tblSpACS " & _
       "where [Acct Number] = '" & Me.cmbOffice & Me.cmbCustomer & "'"
Else
       strSQL = "INSERT INTO tblExACS SELECT [Acct Number], Null As [Exclude], " & _
       "[Share Amt], [Prop CD], [User 1], Null As [User Name], Null As [DateChanged] " & _
       "from tblSpACS " & _
       "where [Acct Number] = '" & Me.cmbOffice & " " & Me.cmbCustomer & "'"
End If
DoCmd.RunSQL (strSQL)
       
For Each ctl In Me.Controls
       If ctl.ControlType = acSubform Then
          ctl.Form.Refresh
       End If
Next

Now the table tblExACS holds 2 records when the user selects a particular Account Number in the comb box.

However, when the subform displays the multiple records from tblExACS, there is a problem.
At the bottom of the subform the record selector states Record 1 of 2.
When I hit the record select advance button to display the second record, a message box pops up
stating the following:

Microsoft Office Access can't find the macro '.'

The macro (or its macro group) doesn't exist, or the macro is new but hasn't been saved. Note that when
you enter the macro groupname.macroname syntax in an argument, you must specify the name the macro's
macro group was last saved under.

Any idea how to resolve this error message ?

0
Comment
Question by:zimmer9
  • 3
  • 2
6 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 16233072
zimmer9,
> cmbOffice RowSource = SELELCT DISTINCT LEFT([Acct Number],4) as
> officenumber from tblSpACS order by LEFT([Acct Number],4)

Did you Copy exactly from the code, if so you mispelt ' SELECT'
0
 
LVL 12

Expert Comment

by:Sayedaziz
ID: 16233114
I assume u have correct query syntax otherwise correct the SELECT statement as suggested by aneeshattingal
 
did u try to Debug---->Compile My Db in vb window and see if there exists any compiling error.

Aziz
0
 

Author Comment

by:zimmer9
ID: 16234349
The SELECT was spelled correctly as follows:
SELECT distinct left([Acct Number],4) as officenumber from tblSpACS order by left([Acct Number],4)

Sorry that I spelled it wrong when I explained my code above.
----------------------------------------------------------------------------------------------
I cleaned up some compile errors. Now when I click on Debug ----> Compile,
the Compile option is grayed out so I cannot select it anymore

What does this mean ?

0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:zimmer9
ID: 16234383
By the way I am using an ADP file.
0
 
LVL 12

Expert Comment

by:Sayedaziz
ID: 16234397
it means there is no compiling error in ur vb code

Check in the propert sheet of both the combo boxes if there exists any dot (.) in any of the events like GotFocus Lost Focus After Update and so on

Aziz
0
 
LVL 12

Accepted Solution

by:
Sayedaziz earned 2000 total points
ID: 16234403
also check for dot (.) in other controls as well

Aziz
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question