I'm working on a database which uses a form to filter results from a table. The plan is to have three unallocated fields (filter fields) at the top of the form (in the header) and the corresponding fields from the table underneath. The user enters the details in the filter fields and the results are filtered to show full or partial matches - this works fine.
What I want is to be able to click an 'add' command button that will create a new record with the values from the filter fields (the idea being that it acts as both a search function and forces the user to check that they are not creating duplicates). However, I need to be able to prevent the add button from working if there is a duplicate (by checking the manually assigned customer ID, which is included as one of the filter fields).
The way I was thinking of doing this was to add a StopMacro action at the start of the macro that creates the new record, but place criteria on that step that check that a record with that Customer ID exists. I'll be damned if I can figure out how though!
Stuart
What I want is to be able to click an 'add' command button that will create a new record with the values from the filter fields (the idea being that it acts as both a search function and forces the user to check that they are not creating duplicates). However, I need to be able to prevent the add button from working if there is a duplicate (by checking the manually assigned customer ID, which is included as one of the filter fields).
The way I was thinking of doing this was to add a StopMacro action at the start of the macro that creates the new record, but place criteria on that step that check that a record with that Customer ID exists. I'll be damned if I can figure out how though!
Stuart