Populating a table from a combobox

sxi12345

Registered User.
Local time
Yesterday, 22:40
Joined
Mar 7, 2007
Messages
12
I have 4 combo boxes on my form that has values in. I want the user to select the values of there choice and when they click the save button, these values are stored in a table field. I Have one combo box working that adds the value to the table field but I cant get the other ones working.

My code


Private Sub saveModuleDetails()


Dim rstSaveModule As DAO.Recordset

Set rstSaveModule = dbase.OpenRecordset("ModuleChoice")


rstSaveModule.AddNew ' Add a new row to the record set
'rstSaveModule("LoanNumber") = Me.txtLoanNumber.Value
rstSaveModule("StudentID") = Me.cboStudentID.Value
rstSaveModule("ModuleName") = Me.cboModuleOne.Value
rstSaveModule.Update

End Sub
 
If the form that contains the ComboBoxes has the ModuleChoice as it's RecordSource and each ComboBox has the appropriate field as its ControlSource and you are on a new record, then simply exiting the form will save the record.
 
May I send you my database??
 
Can't you just post it here so everyone can help? Use the Post Reply and scroll down to the Manage Attachments area. Compact and Repair first and then zip it up. It needs to be < 394 KB I think. Why are you not using a bound form?
 

Users who are viewing this thread

Back
Top Bottom