You could try adding a dummy record and then deleting it from the listbox...
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim record_array As Variant
With cn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source=reporting_tool_db.mdb;"
.Open
End With
With rs
.Open "SELECT '','','','','','','' FROM Questionaire UNION " & _
"SELECT Business_Unit,Inquiry_Type,Rec_Date,Comp_Date,Author,Hours,Path,ID " & _
"FROM Questionaire WHERE [Client_Name] = '" & selected_client & "'", cn
record_array = .GetRows
.Close
End With
cn.Close
With Me.questionaires
.Clear
.list = Application.Transpose(record_array)
.RemoveItem (0) .ListIndex = -1
.ColumnWidths = "1.5 in, 0.7 in, 1 in, 0.8 in, 0.8 in, 0.7 in, 0.1 in"
End With
The first SELECT statement must contain the same number of fields as the second for the UNION to work and by using REMOVEITEM(0) you'll always remove that first (empty) record.
Bookmarks