You are here:

Using MS Access/Making Categories with subcategories

Advertisement


Question
QUESTION: I have been following your guide to creating subcategories for a database. I was building this for a database of Soccer Teams where I wanted to create a combo box for Leagues which then sub categorised the teams within this league.

Everything was working up to the After Update: which keeps showing a Macros error.

Any help or ideas would be great.

ANSWER: What version of Access? What is the exact error? What code are you using?

Hope this helps,
Scott<>
Blog: http://scottgem.wordpress.com
Website: http://www.diamondassoc.com
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

---------- FOLLOW-UP ----------

QUESTION: Ok,

I am using Access 2003 which maybe where the issues lie. I want to have the following three comboboxes in cascading order.

1. Country - selection will then limit the choice of Leagues

2. Leagues - selection of a leagues will limit the choice of clubs

3. Choice of clubs

I have the Country Combo box working correctly using the following code in ROW SOURCE: SELECT CountryID, Country FROM tblCountry ORDER BY Country;

I named this cboCountry

The league script in ROW SOURCE: SELECT LeagueID, League FROM tblLeague WHERE CountryID=Forms!frmCountry!cboCountry ORDER BY League;

When I do this I get an parameter field Forms!frmCountry!cboCountry (I guess this means I have added the wrong Form?)

Finally the last combobox ROW SOURCE: SELECT ClubID, ClubName FROM tblClubName WHERE LeagueID=Forms!FrmLeague!cboLeague ORDER BY ClubName;

This comes up with the parameter value box for Club ID, Club Name, Forms etc.

Hope this is of use.

Alternatively, can i create a new script that will work better?

Thanks,

Ben

ANSWER: I think your problem is that you are using the wrong form name. The formname should be name of the form the combobox you are referencing is on i.e. the current form.

Hope this helps,
Scott<>
Blog: http://scottgem.wordpress.com
Website: http://www.diamondassoc.com
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

---------- FOLLOW-UP ----------

QUESTION: Hi,

That part is resolved - No it comes up with a Macro Error:

Can't find Macro Me!CboLeague

This box also comes up blank despite having relevant data in.

Answer
That sounds like you didn't use the Code Builder to enter some code, but just put the code in properties box. Either that or you are calling a macro somewhere incorrectly.

Hope this helps,
Scott<>
Blog: http://scottgem.wordpress.com
Website: http://www.diamondassoc.com
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

Using MS Access

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scottgem

Expertise

I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.

Experience

I've been designing databases for over 25 years working with dBase, FoxPro, Approach and Access.

Organizations
Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

Education/Credentials
Brooklyn College BA

©2016 About.com. All rights reserved.