G
Guest
Hello,
I am trying to follow an example for finding top N values using VBA given at
this link: http://support.microsoft.com/kb/210039/en-us#appliesto
I've had success with this in the Northwind example database (with my own
tables or with Northwind tables) ...
But in my own databases (with my own tables) I get "Compile error:
User'defined type not defined" with ", db As Database" highlighted in the
code when I compile in the module
and "Compile error.in query expression
'(((Orders.OrderDate)>=NthInGroup([Customers].[CustomerID],5)))'." in the
query design view when I try to run the query.
Am I missing a step? Any help would be very appreciated. Thank you.
I am trying to follow an example for finding top N values using VBA given at
this link: http://support.microsoft.com/kb/210039/en-us#appliesto
I've had success with this in the Northwind example database (with my own
tables or with Northwind tables) ...
But in my own databases (with my own tables) I get "Compile error:
User'defined type not defined" with ", db As Database" highlighted in the
code when I compile in the module
and "Compile error.in query expression
'(((Orders.OrderDate)>=NthInGroup([Customers].[CustomerID],5)))'." in the
query design view when I try to run the query.
Am I missing a step? Any help would be very appreciated. Thank you.