M
Martin
Hello,
I have some code that I cant get to work. I want to run an append query for
each record in a table. Here is the code:
For Each rs In Recordset
DoCmd.RunSQL "INSERT INTO [Import FN] ( Postcode, Brand, [Branch Name],
Sortcode, DistanceCalc, [Distance(km)], [Distance(miles)] )SELECT TOP 1
[Nearest 01].Postcode, [Nearest 01].Brand, [Nearest 01].[Branch Name],
[Nearest 01].Sortcode, [Nearest 01].DistanceCalc, [Nearest
01].[Distance(km)], [Nearest 01].[Distance(miles)] FROM [Nearest 01]"
Next
The append query works but I think I am getting stuck with running that for
each rs.
Can anyone point me in the right direction?
Martin
I have some code that I cant get to work. I want to run an append query for
each record in a table. Here is the code:
For Each rs In Recordset
DoCmd.RunSQL "INSERT INTO [Import FN] ( Postcode, Brand, [Branch Name],
Sortcode, DistanceCalc, [Distance(km)], [Distance(miles)] )SELECT TOP 1
[Nearest 01].Postcode, [Nearest 01].Brand, [Nearest 01].[Branch Name],
[Nearest 01].Sortcode, [Nearest 01].DistanceCalc, [Nearest
01].[Distance(km)], [Nearest 01].[Distance(miles)] FROM [Nearest 01]"
Next
The append query works but I think I am getting stuck with running that for
each rs.
Can anyone point me in the right direction?
Martin