Hi,
I'm using Access 2007 and I have a combo box which uses the 'Not in List' event to check to make sure the entry is in another table, and if not asks the user if they want to Add the record. The code then does an INSERT INTO.... to add the new record, but...
Although when entering the data into the table any trailing spaces are removed by Access, when 'Not is list' triggers it uses the data entered WITH the space to check. If the record IS in the table (without the space) it thinks it's 'Not in List'. This means that when the INSERT INTO tries to write the record it fails due to a duplicate record.
Is there any way I can get it to trim the trailing space before checking it is not in the list?
Thanks
Dean
I'm using Access 2007 and I have a combo box which uses the 'Not in List' event to check to make sure the entry is in another table, and if not asks the user if they want to Add the record. The code then does an INSERT INTO.... to add the new record, but...
Although when entering the data into the table any trailing spaces are removed by Access, when 'Not is list' triggers it uses the data entered WITH the space to check. If the record IS in the table (without the space) it thinks it's 'Not in List'. This means that when the INSERT INTO tries to write the record it fails due to a duplicate record.
Is there any way I can get it to trim the trailing space before checking it is not in the list?
Thanks
Dean