G
Guest
I would like to set up a utility that I could run the same code on different
tables by changing the value of an unbound text from a form to the code. In
the following code what could I put in for [any table] that would allow this?
Or is there another way?
Sub any_Table()
Dim db As Database
Dim rsProvider As DAO.Recordset
Dim strSQL As String
Dim iPos, iLen As Integer
Set db = CurrentDb
strSQL = "Select * from [Any table]"
Set rsProvider = db.OpenRecordset(strSQL, dbOpenDynaset)
blah blah
end sub
Thanks
tables by changing the value of an unbound text from a form to the code. In
the following code what could I put in for [any table] that would allow this?
Or is there another way?
Sub any_Table()
Dim db As Database
Dim rsProvider As DAO.Recordset
Dim strSQL As String
Dim iPos, iLen As Integer
Set db = CurrentDb
strSQL = "Select * from [Any table]"
Set rsProvider = db.OpenRecordset(strSQL, dbOpenDynaset)
blah blah
end sub
Thanks