MS Access Function CreateSimpleStrings()

A simple function that will loop through and create strings that add a number to a simple string. This string will then be used to create update queries. The same could be done in Excel or any other spreadsheet option but this stores the queries nicely and neatly into a table.

In this instance you want to have created a table called

Which has the following fields

Public Function CreateSimpleStrings()

Dim i As Integer
Dim rs As DAO.Recordset
Dim db As DAO.Database
Set db = CurrentDb

Set rs = db.OpenRecordset("T002ResidentialSearch")

For i = 2 To 100

With rs
rs!ResidentialString = "Erection of " & i & " houses"
rs!Houses = i
End With
Next i


MsgBox "Complete"

End Function

Author: Mark

Mark Brooks a forty something individual working and living in and around Edinburgh