G
Guest
I am working on a validation of a database and I need to check whether or not
a field contains positive integer numbers.
I have created a function called "is_pos_integer" which accepts a variant
parameter and returns a boolean result.
My problem is that if I test my function on a simple query like this:
SELECT tbl_students_import.record_id, tbl_students_import.years_prior_study,
is_pos_integer([years_prior_study]) AS Test
FROM tbl_students_import;
the quey shows all 0s in the field "Test". Actually my recordset contains
some negative numbers in "years_prior_study" along with letters
(years_prior_study is defined as text field in the table). The strange thing
is that the debugger shows me that my function correctly detects the values
which are not positive integers but the query does not.
Does anyone have any idea why this happens?
If needed I can post the code of the funtion.
Many thanks,
Paolov
a field contains positive integer numbers.
I have created a function called "is_pos_integer" which accepts a variant
parameter and returns a boolean result.
My problem is that if I test my function on a simple query like this:
SELECT tbl_students_import.record_id, tbl_students_import.years_prior_study,
is_pos_integer([years_prior_study]) AS Test
FROM tbl_students_import;
the quey shows all 0s in the field "Test". Actually my recordset contains
some negative numbers in "years_prior_study" along with letters
(years_prior_study is defined as text field in the table). The strange thing
is that the debugger shows me that my function correctly detects the values
which are not positive integers but the query does not.
Does anyone have any idea why this happens?
If needed I can post the code of the funtion.
Many thanks,
Paolov