sly like Coyote
Registered User.
- Local time
- Today, 06:47
- Joined
- Apr 14, 2010
- Messages
- 82
I have an error I haven't been able to handle. I have a many-to-many relationship between two tables, one for clients and one for vouchers, broken down using a junction table. I have a mainform based on the vendor record and a subform with a combo box to select a client (or clients) to associate with the voucher and populate the junction table.
The problem I have is that my users sometimes notice their intended client isn't in the system from the dropdown options and instead of hitting 'enter' or something will try to delete their entry and click away to the 'create client' command button that launches the form needed to enter a new client record. This prompts an error for trying to select a null value.
I've handled the NotInList event when they just try to enter a client that doesn't exist, but I can't figure out how to catch this null value entry error - the only thing they can do is select another client, leave the subform, and then delete the 'wrong' selection. I've thought about just getting rid of the command button (the NotInList can launch it automatically anyway) but that doesn't fix the actual error and would be unintuitive in many cases.
The problem I have is that my users sometimes notice their intended client isn't in the system from the dropdown options and instead of hitting 'enter' or something will try to delete their entry and click away to the 'create client' command button that launches the form needed to enter a new client record. This prompts an error for trying to select a null value.
I've handled the NotInList event when they just try to enter a client that doesn't exist, but I can't figure out how to catch this null value entry error - the only thing they can do is select another client, leave the subform, and then delete the 'wrong' selection. I've thought about just getting rid of the command button (the NotInList can launch it automatically anyway) but that doesn't fix the actual error and would be unintuitive in many cases.