Combo Boxes

  • Thread starter Thread starter David
  • Start date Start date
D

David

I entered the following code: =[cmbCountry].[RowSource]
="Select tblCountry.CountryID,
tblCountry.Country from tblCountry Where tblCountry.Region
=' " & [Me]![cmbRegion1] & ";" & got teh following
error: "The object doesn't contain the autonmation
object "Me". Do you have anythoughts how to resolve it?
 
I entered the following code: =[cmbCountry].[RowSource]
="Select tblCountry.CountryID,
tblCountry.Country from tblCountry Where tblCountry.Region
=' " & [Me]![cmbRegion1] & ";" & got teh following
error: "The object doesn't contain the autonmation
object "Me". Do you have anythoughts how to resolve it?

This message should be in the original thread, so that others can make
some sense out of it.

1) Where did you place this code?
It belongs in the cmbRegion1 AfterUpdate event code (not as the
rowsource property of cmbCountry, nor directly on the AfterUpdate
event line. The event line should read [Event Procedure]).

2) Your code has an extra = in it:
=[cmbCountry].[RowSource] ="Select tblCountry.CountryID,... etc.
The first = should not be there. It should read...
[cmbCountry].[RowSource] ="Select tblCountry.CountryID,... etc.

3) You also left out a single quote. It should read...
Where tblCountry.Region = ' " & [Me]![cmbRegion1] & " ' ;"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top