jkurpias
Oct 11th, 1999, 12:40 PM
I have several forms of table data with a lot of text & combo boxes in access97 vba. I need to insure that the users don't enter characters such as \/"'&+ etc. I pass the control text or value to a function that checks all the characters and returns the same text/value if its ok or vbNull if it isn't ok. I call the function through the control's Validation Rule and use Validation Text to display the error message.
It works just fine for valid input and invalid input. But it doesn't work at all if an item is deleted...it won't accept an empty control.
I tried returning a String, then I tried a Varient. I tried returning an un-initialized variable, vbNull, vbEmpty & "". Nothing works! Got any ideas...other than writing separate code for each control?
It works just fine for valid input and invalid input. But it doesn't work at all if an item is deleted...it won't accept an empty control.
I tried returning a String, then I tried a Varient. I tried returning an un-initialized variable, vbNull, vbEmpty & "". Nothing works! Got any ideas...other than writing separate code for each control?