Hermanator
Technical User
I have a strange problem in Access that has to do with a problem I have bothered you about earlier.
I want to make an [Event Procedure] which checks if a certain field is empty, and if empty places a certain text in it.
But I can't detect wether or not the field is empty. I have tried:
* If Me.address = "" then
* If LEN(Me.Address) = 0 then
* If Me.Address = Empty then
* If IsEmpty(Me.Address) then
It even doesn't work to use a NOT like this:
* If NOT ( LEN(Me.Address) > 0 ) ) then
Since the Address field is in fact an e-mail address, I have also tried to check wether the string contains a '@' character. But this also doesn't work.
All these solutions work correctly if the field isn't empty. But when the field is empty, nothing happens.
-> It seems that if the field is empty, the whole IF block is skipped!
The only solution that I can come up with is to check for the opposite condition, and if the expression satisfies the opposite condition it skippes the line in which the text in the field is replaced. But I couldn't do this since a GOTO command didn't work in an IF block.
I promised I wouldn't have to bother you again ;-) except I'm so puzzled about this !!!!
I want to make an [Event Procedure] which checks if a certain field is empty, and if empty places a certain text in it.
But I can't detect wether or not the field is empty. I have tried:
* If Me.address = "" then
* If LEN(Me.Address) = 0 then
* If Me.Address = Empty then
* If IsEmpty(Me.Address) then
It even doesn't work to use a NOT like this:
* If NOT ( LEN(Me.Address) > 0 ) ) then
Since the Address field is in fact an e-mail address, I have also tried to check wether the string contains a '@' character. But this also doesn't work.
All these solutions work correctly if the field isn't empty. But when the field is empty, nothing happens.
-> It seems that if the field is empty, the whole IF block is skipped!
The only solution that I can come up with is to check for the opposite condition, and if the expression satisfies the opposite condition it skippes the line in which the text in the field is replaced. But I couldn't do this since a GOTO command didn't work in an IF block.
I promised I wouldn't have to bother you again ;-) except I'm so puzzled about this !!!!