DCount

T

TitaniaTiO2

Thanks for all the help from everyone

Here's another one.

my DCount statement is consistently returning a 0 value.

test = DCount("[DocumentNumber]", "tblTraining", "[DocumentNumber] = ' " &
Me![cmbDocumentNumber] & "'")

Note - DocumentNumber is a text field.

Any suggestions?

Thanks

Titania
 
F

fredg

Thanks for all the help from everyone

Here's another one.

my DCount statement is consistently returning a 0 value.

test = DCount("[DocumentNumber]", "tblTraining", "[DocumentNumber] = ' " &
Me![cmbDocumentNumber] & "'")

Note - DocumentNumber is a text field.

Any suggestions?

Thanks

Titania

You have a space between the first ' and the " (= ' " &) which would
cause the data to appear as ' Mydata' instead of 'Mydata'

Try:
test = DCount("*", "tblTraining", "[DocumentNumber] = '" &
Me![cmbDocumentNumber] & "'")
 
Top