Forum Discussion
Bjones9942
Nov 07, 2024Copper Contributor
IsMissing not working since last update
I use a few optional parameters here and there, and check to see if they have a value with the IsMissing function. As of the last update (around 11/5/24) it's no longer working. I can check to see ...
George_Hepworth
Nov 07, 2024Silver Contributor
We are talking about an Access database, right?
When you say this function no longer works in your database, what does happen? Is an error raised? The wrong result? No result?
- Bjones9942Nov 08, 2024Copper Contributor
Yes, it's an Access database. The wrong result is returned.
- George_HepworthNov 08, 2024Silver Contributor
By wrong result, I assume, you mean that the function returns true when it should return false, and vice versa?
Have you set a breakpoint in one of those procedures which uses this function and stepped through the code line by line to inspect the values being used?
Can you create a small test procedure to verify that the function doesn't work at all?
If you can share a sample accdb with just enough sample data and an example of a procedure that uses this function for us to review?I wasn't able to replicate the problem unfortunately.
- Bjones9942Nov 08, 2024Copper Contributor
George,
I am calling a subroutine that includes an optional parameter. In this instance, I'm not passing the parameter, but a 'IsMissing(parameter) is returning false. I have stepped through the code and this is where the problem lies.
The subroutine is defined as:Sub EmailSignUpSheet(Optional tDateStr As String).
When calling it with 'CALL EmailSignUpSheet' an IsMissing(tDateStr) [which exists in the subroutine directly after the dim statements] returns False instead of True.
I received an update to office around 11/5/24. Prior to that the IsMissing(tDateStr) returned True.
I can use a TRIM$(tDateStr) = "" instead, which works, but this is not my preference.