Hello, I have a listbox that list the names and phone numbers of clients. I want to look up in a large table (84 fields) off of the phone number from the listbox. My question is how do I assign all 84 fields to an array from a table, so they can be easily used to fill out variuos reports.
[code=vb]
Dim strSearch As String
Dim strSQL As String
strSearch = Me.lstCompanies .Column(5) ' set strSearch = to phone number
strSQL = "SELECT * FROM Table1 WHERE contact_phone= strSearch;"
DoCmd.RunSQL strSQL
[/code]
This should select all records from the table, but I want to save them into an array(1), array(2)... all the way up to 84.
[code=vb]
Dim strSearch As String
Dim strSQL As String
strSearch = Me.lstCompanies .Column(5) ' set strSearch = to phone number
strSQL = "SELECT * FROM Table1 WHERE contact_phone= strSearch;"
DoCmd.RunSQL strSQL
[/code]
This should select all records from the table, but I want to save them into an array(1), array(2)... all the way up to 84.
Comment