AndrewMozley
Programmer
I have a form which allows me to examine and edit a table, Thistable. The table has fields This.code, This.desc and This.Supplier. This.supplier identifies a record in an associated table thattable, which has fields That.Account and That.suppname. However This.Supplier may be blank. In this case it does not reference any record in Thattable.
When I am editing or adding the records in Thistable, I want to display the value of This.supplier and the associated description, That.Suppname.
To do this I have a combo box on the form, cboSupp
So cboSupp.controlsource = Thistable.Supplier
cboSupp.Rowsourcetype = 6 (Fields)
cboSupp.RowSource = Thattable.Account,Suppname
This works well and allows the Suppname to be shown corresponding to This.supplier
However (when I am editing Thistable) I would like to be able to enter a blank value into This.supplier. In this case the Suppname field would be blank.
Is there a way of doing this with a combo box? I suppose I could make the RowsourceType = 5 (array), and populate that array in the Init() method of the form, with one blank pair of values, and then fill the rest with That.account, that.suppname.
But the table Thattable is quite large, and I feel that there must be a better way. Grateful for suggestions.
When I am editing or adding the records in Thistable, I want to display the value of This.supplier and the associated description, That.Suppname.
To do this I have a combo box on the form, cboSupp
So cboSupp.controlsource = Thistable.Supplier
cboSupp.Rowsourcetype = 6 (Fields)
cboSupp.RowSource = Thattable.Account,Suppname
This works well and allows the Suppname to be shown corresponding to This.supplier
However (when I am editing Thistable) I would like to be able to enter a blank value into This.supplier. In this case the Suppname field would be blank.
Is there a way of doing this with a combo box? I suppose I could make the RowsourceType = 5 (array), and populate that array in the Init() method of the form, with one blank pair of values, and then fill the rest with That.account, that.suppname.
But the table Thattable is quite large, and I feel that there must be a better way. Grateful for suggestions.