Dcount gets value from combobox

BrainDead

Registered User.
Local time
Today, 23:13
Joined
Aug 24, 2001
Messages
12
I have a txtbox with the control source as the following:

=DCount("location","domainfacts","location = '" & [me].[ccfind] & "'")

This is so that a user can select a country from the combobox "ccfind" and then the amount of times that country appears in the field location will be displayed in the txtbox.

I get !value with the above code.
If I use the code:

=DCount("location","domainfacts","location = '[me].[ccfind]'")
I get no error, and just the value "0"

Can someone point me in the right direction...

BrainDead... "The feeling you get after staring at your computer all day"
 
Try this:

=DCount("[Location]", "domainfacts", "[Location] = '" & Me.ccfind & "'")
 
Howlsta....

I get the same error as above, and the me.ccfind automatically reverts back to [me].[ccfind]

Any other suggestions???

Thnx
 
Sorry, I should have realised it might do that. I just tried to see if I could do it with some of my data, but VB didn't like it.

Rich
 

Users who are viewing this thread

Back
Top Bottom