November 27, 200421 yr This may be obvious but, is there a way to create a new record when a related record cannot be found? Thanks for your patience.
November 27, 200421 yr You can use the IsValid() function or the Lookup() function to test for the existence of a foreign key in the related table that matches your primary key. If it exists, you can go to the related record, and if it doesn't you can then run a script to add a new record in the related table, or prompt the user to take action, etc.
November 28, 200421 yr It's better, and faster, to use IsEmpty when testing for related records. IsValid should be used to test data type mismatches (similar to field validation), whether a related table/file currently exists or has been renamed without updating the relationship, and whether a related field currently exists or has been deleted.
Create an account or sign in to comment