• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 890
  • Last Modified:

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

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
zimmer9
Asked:
zimmer9
  • 3
  • 2
1 Solution
 
Aneesh RetnakaranDatabase AdministratorCommented:
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
 
Sayad Aziz AhmadCommented:
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
 
zimmer9Author Commented:
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
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
zimmer9Author Commented:
By the way I am using an ADP file.
0
 
Sayad Aziz AhmadCommented:
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
 
Sayad Aziz AhmadCommented:
also check for dot (.) in other controls as well

Aziz
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now