I did something that you say, but now I have another problem. The problem is table name not found or not declarated.!

Can you help me with this please I think I feel a little more close to solve it.


Dim dbs As Database
Dim rst As Recordset
Dim strName as String

strName = _
Trim(InputBox("Enter Last Name first letter eg: [A] for Anderson"))
If strName = "" Then Exit Sub

Set dbs = OpenDatabase("C:\Address\Adddress.mdb")

' Open a Recordset from an SQL statement that specifies a
' sort order.

Set rst = dbs.OpenRecordset("SELECT * " & _
"FROM strName ORDER BY LastName, FirstName", _
dbOpenDynaset)

dbs.Close

End Sub

Thank you for your help