I have made it super easy for my users to add New Carriers but now they are creating duplicates even though they have a combobox to see if it was added already. So what I want to do now is when they go to add a New Carrier, I want to Query for all results that are similar and ask them if they are sure it isn't one of the carrier's in the list. Is this possible? I looked at a Like operator and adding an asterick to the beginning and another at the end but what if the middle is just a little different? Is this possible to be done?
I have an idea how to do it but I don't know the SQL for it. Here is what I have started with:
now I want to add an asterick before the control and after the control
Also, I want a seperate test for First letter in the Control then Asterick then last letter in the control. I think this should help in most cases.
I even tested this:
and nothing shows up
and this:
I have an idea how to do it but I don't know the SQL for it. Here is what I have started with:
Code:
SELECT [Carrier Table].Carrier
FROM [Carrier Table]
WHERE ((([Carrier Table].Carrier) Like [Forms]![frmSubAppts]![cobCarrier]))
ORDER BY [Carrier Table].Carrier;
Also, I want a seperate test for First letter in the Control then Asterick then last letter in the control. I think this should help in most cases.
I even tested this:
Code:
SELECT [Carrier Table].Carrier
FROM [Carrier Table]
WHERE ((([Carrier Table].Carrier) Like ' * & [Forms]![frmAddNewCarrier]![tbCarrier] & *'))
ORDER BY [Carrier Table].Carrier;
and this:
Code:
SELECT [Carrier Table].Carrier
FROM [Carrier Table]
WHERE ((([Carrier Table].Carrier) Like ' [Forms]![frmAddNewCarrier]![tbCarrier] *'))
ORDER BY [Carrier Table].Carrier;
Last edited: