yhchen
Registered User.
- Local time
- Yesterday, 19:23
- Joined
- Jul 6, 2008
- Messages
- 63
I have a form that will write data into a query which has two linked tables, call it Table A and Table B.
In table A, the “ID” field is a required field.
In table B, the “Name” field is a required field, this will only trigger if Field B is not null.
So for example, if a staff write a record without writing any data to Table B, the data will only write into Table A. If additional data (e.g. Field B) is not null, then I will need Name field to be not null.
All these have been set up but I want a validation message to warn all the users that Name field should not be null when they triggered Table B.
Apparently I cannot use macro and set it up in Before Update form property because this will apply to those records that weren’t written to Table B as well.
Would any body can help me to write an “IF” then warning message VBA code?
Many thanks in advance for any help you can provide.
In table A, the “ID” field is a required field.
In table B, the “Name” field is a required field, this will only trigger if Field B is not null.
So for example, if a staff write a record without writing any data to Table B, the data will only write into Table A. If additional data (e.g. Field B) is not null, then I will need Name field to be not null.
All these have been set up but I want a validation message to warn all the users that Name field should not be null when they triggered Table B.
Apparently I cannot use macro and set it up in Before Update form property because this will apply to those records that weren’t written to Table B as well.
Would any body can help me to write an “IF” then warning message VBA code?
Many thanks in advance for any help you can provide.