Hi im just in need of some help on how to populate a combobox "dropdown list" type.
I know I can easily do it using a standard combo, but I wanted to use a dropdown list as it stops the end user from editing the entry to something other than the list in the combo.
When ever I try and load the form, the program dies with the following error.
Run-Time Error '383'
'Text' property is read-only
I can work out how to get around this!.
Any Ideas????????
here's the code:
----------------------------------------------------------------
Dim oRSMain As ADODB.Recordset
Dim strConnect As String
Dim strSQL As String
Dim strSQLDet As String
strConnect = INI_getString("String", "ConnectString1", App.Path & "\dataconn.ini")
strSQL = "Select * from Orders where OrderID = " & frmOrders.DGridOrdList.Columns(0).Value
Set oRSMain = New Recordset
oRSMain.Open strSQL, strConnect, adOpenForwardOnly, adLockReadOnly
With oRSMain
frmOrders.cboBillCountry.Text = oRSMain.Fields("BillCountry").Value & ""
end with
---------------------------------------------------------------------
I know I can easily do it using a standard combo, but I wanted to use a dropdown list as it stops the end user from editing the entry to something other than the list in the combo.
When ever I try and load the form, the program dies with the following error.
Run-Time Error '383'
'Text' property is read-only
I can work out how to get around this!.
Any Ideas????????
here's the code:
----------------------------------------------------------------
Dim oRSMain As ADODB.Recordset
Dim strConnect As String
Dim strSQL As String
Dim strSQLDet As String
strConnect = INI_getString("String", "ConnectString1", App.Path & "\dataconn.ini")
strSQL = "Select * from Orders where OrderID = " & frmOrders.DGridOrdList.Columns(0).Value
Set oRSMain = New Recordset
oRSMain.Open strSQL, strConnect, adOpenForwardOnly, adLockReadOnly
With oRSMain
frmOrders.cboBillCountry.Text = oRSMain.Fields("BillCountry").Value & ""
end with
---------------------------------------------------------------------