Hello Community,
I am injecting some data form Excel from into Access DB. The problem is when user puts some BAD value. SQL return en error with type mismatch in the background and data is not INSERTED into DB.
I would like to validate data that is being injected into Access using Validation Rules for some of the fields.
I wonder if it is better to validate on the level of the VBA code or in Access itself. Will VBA return an error when it encounters Validation Rule?
The rules I'd like to apply:
If numeric value IS NULL or empty then put 0
If date IS NULL or 0 then put some default date (let's say =Today() or #1/1/1900#).
Regards,
Witek
I am injecting some data form Excel from into Access DB. The problem is when user puts some BAD value. SQL return en error with type mismatch in the background and data is not INSERTED into DB.
I would like to validate data that is being injected into Access using Validation Rules for some of the fields.
I wonder if it is better to validate on the level of the VBA code or in Access itself. Will VBA return an error when it encounters Validation Rule?
The rules I'd like to apply:
If numeric value IS NULL or empty then put 0
If date IS NULL or 0 then put some default date (let's say =Today() or #1/1/1900#).
Regards,
Witek
Last edited: