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 ?

zimmer9Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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'
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
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 ?

Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

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

Aziz

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.