I have form that is populated with agricultural spray records that have been saved in a worksheet(Spray_Records). When entering a new spray record, A combobox on that form (which is populated during form_initialize()) contains a list of chemicals retrieved from a different worksheet(Chemicals). Once the spray application has been inputted I save it as a new record in Spray_Records. The line that saves the chemical name and EPA registration number is:
ws_Spray_Records.cells(5, ColumnNumber)=me.cboChemicalName.Column(0) 'The chemical name
ws_Spray_Records.cells(6,ColumnNumber) = me.cboChemicalName.Column(1) 'EPA Registration Number
Later, if I want to populate the form with an existing record, all the textboxes display the data with no problem. However, cboChemicalName is blank even though the chemical was saved correctly. The retrieval code looks like this:
me.cboChemicalName=ws_Spray_Records.cells(5, ColumnNumber)
I'm sure this is where the problem lies, but I can't seem to find a solution. Any help would be greatly appreciated.
ws_Spray_Records.cells(5, ColumnNumber)=me.cboChemicalName.Column(0) 'The chemical name
ws_Spray_Records.cells(6,ColumnNumber) = me.cboChemicalName.Column(1) 'EPA Registration Number
Later, if I want to populate the form with an existing record, all the textboxes display the data with no problem. However, cboChemicalName is blank even though the chemical was saved correctly. The retrieval code looks like this:
me.cboChemicalName=ws_Spray_Records.cells(5, ColumnNumber)
I'm sure this is where the problem lies, but I can't seem to find a solution. Any help would be greatly appreciated.