I have a form in Access 2000 with a combo box no longer populating. In the previous version of my front end, the combo box did populate, and I can't tell what the difference is.
The form is called "frmEditCustomers". The only difference in the vb for the form is code for command boxes related to a list box in a different page of a tab control that is one level up from where my problem is.
I have 1 combo box - "cboContractVehicleID", which does populate in both versions of my front end.
The combo box in question is called "cboCVInstallations" and the record source is a query called ECCVInstalls, which references the first combo box, "cboContractVehicleID".
The idea is once you update the first combo box, it requeries for the combo box that is causing trouble. Here is the code that is unchanged from my prior front end to my new front end:andCode:Private Sub cboContractVehicleID_AfterUpdate() With Me .lblTemporaryHold.Visible = Not CBool(.cboContractVehicleID.Column(4)) .txtTemporaryHoldDate.Visible = Not CBool(.cboContractVehicleID.Column(4)) .cmdPlaceCVTemporaryHold.Visible = (CBool(.cboContractVehicleID.Column(4)) And (Not CBool(.cboContractVehicleID.Column(7)))) .pgePredictedRemoval.Visible = Not CBool(.cboContractVehicleID.Column(7)) .txtPredictedRemovalDate = Null .txtCalculatedAmount = Null .lblPayable.Visible = False .lblProrate.Visible = False -->>>> .cboCVInstallations = .cboContractVehicleID .cboCVRemovals = .cboContractVehicleID RequeryCVLists .tabCV.Visible = Not IsNull(.cboContractVehicleID) .lblSelectVehicleRequest.Visible = IsNull(.cboContractVehicleID) .cmdChgLastMonDate.Visible = IsNull(.EndDate) If (gstrSecurityLevel = "A" Or gstrSecurityLevel = "AR") And Len(.cboCVRemovals.Column(1)) = 0 Then .cmdContractVehicleEdit.Visible = True Else .cmdContractVehicleEdit.Visible = False End If End With End SubThe query sql for ECCVInstalls is, which is the record source for my combo box in trouble, cboCVInstallations, is the same in both front ends:Code:Private Sub RequeryCVLists() On Error GoTo Error_Handler With Me -->>>> .cboCVInstallations.Requery .cboCVRemovals.Requery .lstMonitoringHistory.Requery .lstLockOuts.Requery End With Exit_Error_Handler: Exit Sub Error_Handler: Select Case Err.Number Case INITIALIZE_GLOBALS_ERROR InitializeGlobals Resume Case Else MsgBox "Error " & Err.Number & " : " & Err.Description, vbExclamation, "Error!" Resume Exit_Error_Handler End Select End Sub
SELECT tblContractVehicles.ContractVehicleID, tblContractVehicles.InstallDate, tblServiceCenters.ServCenter, Format([Serial],">") AS BAIID,
Format([Rent],"Currency") AS Rnt, Format([Insurance],"Currency") AS Ins, GetTechnician([InstallTechID]) AS Tech,
tblContractVehicles.ID110MailDate, tblDMVForms.FormId AS DL920Install, tblContractVehicles.DL920IssueDate, tblContractVehicles.DL920MailDate,
tblContractVehicles.ID120InstallMailDate, tblDMVForms_1.FormId AS DL922Install, tblContractVehicles.DL922InstallMailDate, tblDMVForms_2.FormId AS
DL924Install, tblContractVehicles.DL924IssueDT, tblContractVehicles.DL924IssueDT, tblVehicles.VIN, tblVehicles.License,
tblContractVehicles.SlidingScale, tblContractVehicles.SlScaleFollowUpDate, tblContractVehicles.VehicleID, tblContractVehicles.MonitorFee AS
PromoMonFee
FROM ((tblDMVForms AS tblDMVForms_1 RIGHT JOIN (tblDMVForms RIGHT JOIN (tblServiceCenters RIGHT JOIN (tblBAIIDs RIGHT JOIN tblContractVehicles ON
tblBAIIDs.BAIIDID = tblContractVehicles.BAIIDID) ON tblServiceCenters.SCID = tblContractVehicles.InstallSCID) ON tblDMVForms.DMVFormID =
tblContractVehicles.DL920ID) ON tblDMVForms_1.DMVFormID = tblContractVehicles.DL922InstallID) LEFT JOIN tblDMVForms AS tblDMVForms_2 ON
tblContractVehicles.DL924ID = tblDMVForms_2.DMVFormID) INNER JOIN tblVehicles ON tblContractVehicles.VehicleID = tblVehicles.VehicleID
WHERE (((tblContractVehicles.ContractVehicleID)=CLng(Nz([Forms]![frmEditCustomers]![cboContractVehicleID],0))))
ORDER BY tblContractVehicles.InstallDate;
I know I have the same column listed twice in the SELECT: tblContractVehicles.DL924IssueDT. That didn't cause a problem in the one front end, worked fine with it there.
I was actually trying to migrate my backend from Access 2000 to SQL Server Express 2008 R2.I then noticed this problem, that the combo box wasn't populating, but with the backend now in SQL Server, I actually got an error that said "Error 3146 : ODBC--call failed." Don't know if that's related, I got it on the same form called frmEditCustomers.