Problem with ECount function

arunakumari02

Registered User.
Local time
Today, 13:31
Joined
Jun 2, 2008
Messages
91
I have a problem with ECount.

The statement generates an error:

Code:
int X = ECount("[ID]", "tblResource", "[ProjectID] =" [B]& labID[/B], True)

The Ecount should generate unique values of ID from the tblResource where projectId = labID

Error says & labID sub or function not defined. (labID is in the form with a number)

Any help
 
Ecount is not a standard Access function. I'm guessing you may be using Allen Browne's code here?

Perhaps you could post the code for Ecount. Also post the rest of your code before and after the statement.

My guess is you haven't defined what labID is.

Chris
 
X = ECount("[ID]", "tblResource", "[ProjectID] =" & Me.labID, True)

.
 
Code:
X = ECount("[ID]", "tblResource", "[ProjectID] =" & Me.labID, True)

I still get error says that &Me.labID function or sub not defined.

Any help
 
a) Is labID the name of the control on the form, or, the data that is in a control?

b) Is this x = .... in a form event or is it in a module?

-dK
 
It shouldn't matter because you are pointing to the label as long as the label has its information prior to you executing the EFunc.

Why not point the EFunc you have to the same form and control that the label gets its value from?

-dK
 

Users who are viewing this thread

Back
Top Bottom