How to get values from multiple records?

How to get values from multiple records?

Hi All,

I thought this would be straight forward but I've lost the plot ...

I have a form Customers. On Add Customer, sometimes, the customer name already exists in the table, which is fine because the address may be different. So we could have "Doe, John" with an address of "Hokitika" and "Doe, John" with an address in "Taranaki". Perfectly ok but I'd like to bring this to the attention of the user.

It isn't possible to compare addresses as there could be slight differences between entries.

What I would like to do is to find any records in Customers that Customer_Name matches input.Customer_Name and then display them in an alert, along with their address so that the user can see if any of them match a customer they're entering. There would probably be a maximum of three names that would come up.

I have been going around in circles trying to code this but I can't seem to find a way of loading individual variables with data from iterated records.

Any clues please?

Many thanks

Chris