Option Compare Database Option Explicit Private Sub cmdAdd_Click() lstSection.AddItem Item:=New_Section_Value End Sub Private Sub Form_Load() End Sub Private Sub Form_Open(Cancel As Integer) Call Set_Combos Call Set_ListBoxes End Sub Private Sub Set_Combos() cboVolume.Value = Nz(cboVolume.Column(0, 0), 0) End Sub Private Sub Set_ListBoxes() Call Fill_Section_ListBox End Sub Private Sub Fill_Section_ListBox() Dim lVol As Long lstSection = "" lVol = Nz(cboVolume.Column(0, 0), 0) Dim sSQL As String sSQL = "SELECT [SectionName], [VolumeID] FROM [tblSections] WHERE [VolumeID] = " & lVol & " ORDER BY [SectionName] " Dim rs As DAO.Recordset Set rs = CurrentDb.OpenRecordset(sSQL) Do Until rs.EOF lstSection.AddItem Nz(rs.Fields(0), "") rs.MoveNext Loop rs.Close Set rs = Nothing Me.Refresh DoEvents End Sub
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE