kunguito
08-29-2008, 02:09 AM
Hi,
The following code assigns the result of a query to a combobox.
Dim qdf As QueryDef
Dim cbobox As Combobox
Dim parameterZero As String, parameterOne as String
Set qdf = CurrentDb.QueryDefs(NameOfUserDesignedQuery)
qdf.Parameters(0) = parameterZero
qdf.Parameters(1) = parameterOne
Set cbobox.Recordset = qdf.OpenRecordset
Set qdf = Nothing
Quetsion: How can I now add to the values an extra item, for example "all" if the combobox datasource type is set to Table or query?
Thanks
The following code assigns the result of a query to a combobox.
Dim qdf As QueryDef
Dim cbobox As Combobox
Dim parameterZero As String, parameterOne as String
Set qdf = CurrentDb.QueryDefs(NameOfUserDesignedQuery)
qdf.Parameters(0) = parameterZero
qdf.Parameters(1) = parameterOne
Set cbobox.Recordset = qdf.OpenRecordset
Set qdf = Nothing
Quetsion: How can I now add to the values an extra item, for example "all" if the combobox datasource type is set to Table or query?
Thanks