I'm using DMin function in Ms-Access VBA, as below Dim MinVal as integer MinVal = DMin("ARRID", "Tbl_abc", "[RequestStatus] = 1 AND [WorkInProgress] = -1")
The above function was working fine untill now for almost a year, and all of a sudden it is giving me Overflow Error. i'm doing this Dmin on an Auto number, so there is no chance of Null/zeros. Ideally the MinVal should be 40316 from the data which is not big number as well. I have tried compacting and reparing the database. still the problem persist.However, when i run the above DMin from an access query it is working fine. it is only in VBA it is not picking up.
Any help will be appriciated.