Question : Problem with populating a combo box in access 2007

Hi Experts,

I am having difficulty getting a combo box to populate.  I'm trying to do it like a listbox using sql, but i'm stuck, and it's not working.  I'll post the code, and i do have a lot commented out so i can test what works right now.  Can you help? Thanks :-)

Look at form load, form current, cboLotNo change, and cboLotNo click...something might be contradicting itself.

Laura
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
Option Compare Database


Private Sub cboLotNo_Change()
    
    Dim rs As Recordset
   
    'change the contents of the listbox based on which lot is chosen
    If Me.optLot = True Then
        Set rs = CurrentDb().OpenRecordset("Select dbo_Prospects.ProspectID, dbo_Prospects.FN1, dbo_Prospects.MN1, dbo_Prospects.LN1, dbo_Prospects.CCity, dbo_Prospects.CState, dbo_Prospects.CZip, dbo_Prospects.Home, dbo_Prospects.Cell, dbo_Prospects.SalesPerson from dbo_Prospects WHERE Lot ='" & Me.cboLotNo & "' Order By dbo_Prospects.LN1", dbOpenDynaset, dbSeeChanges)
            lstProspects.RowSource = ""
                Do While Not rs.EOF
                    lstProspects.AddItem rs("ProspectID") & ";" & rs("LN1") & ";" & rs("FN1") & ";" & rs("MN1") & ";" & rs("CCity") & ";" & rs("CState") & ";" & rs("CZip") & ";" & rs("Home") & ";" & rs("Cell") & ";" & rs("Salesperson")
                    rs.MoveNext
                Loop
    End If
    Me.lstProspects.Requery

    'Close dataset
    rs.Close
    
End Sub

Private Sub cboLotNo_Click()

    Dim rs As Recordset
    
    If Me.optLot = True Then
        Set rs = CurrentDb().OpenRecordset("SELECT * FROM dbo_Location", dbOpenDynaset, dbSeeChanges)
        Me.cboLotNo.RowSource = ""
            Do While Not rs.EOF
                cboLotNo.AddItem rs("LotNo")
                rs.MoveNext
            Loop
    End If
    Me.cboLotNo.Requery
    
    'close dataset
    rs.Close
    
End Sub

Private Sub cboTradeInDeal_Click()

    If Me.cboTradeInDeal.Value = "Yes" Then
        DoCmd.OpenForm "frmTradeIn", acNormal
        Forms!frmTradeIn!txtOrderID.Value = Me.txtOrderID.Value
        Me.chkTradeInFinancing.Value = True
    End If
    
End Sub

Private Sub cmdComments_Click()

    DoCmd.OpenForm "frmComments", acNormal
    
End Sub

Private Sub cmdOptEquip_Click()

    DoCmd.OpenForm "frmOptEquip", acNormal
    
End Sub

Private Sub cmdRealEstate_Click()

    DoCmd.OpenForm "frmRealEstate", acNormal
    
End Sub

Private Sub cmdSameAddress_Click()

    Me.txtDelSt.Value = Me.txtCurrSt.Value
    Me.txtDelLot.Value = Me.txtCurrLot.Value
    Me.txtDelCity.Value = Me.txtCurrCity.Value
    Me.cboDelState.Value = Me.cboCurrState.Value
    Me.txtDelZip.Value = Me.txtCurrZip.Value
    Me.txtDelCounty.Value = Me.txtCurrCounty.Value
    
End Sub

Private Sub cmdSaveBuyer_Click()

    'writes entered data to database
    'If addNew = True Then
        'Call InsertRecord(Form, "Deals")
        'Call InsertRecord(Form, "Prospects")
    'Else
        'Call UpdateRecord(Form, "Deals")
        'Call UpdateRecord(Form, "Prospects")
    'End If
    
End Sub

Private Sub cmdSiteWork_Click()

    DoCmd.OpenForm "frmSiteWork", acNormal
    
End Sub

Private Sub Form_Current()

    Dim rs As Recordset
    Dim rs2 As Recordset
    
    'bring in terminal server user id
    Set rs = CurrentDb().OpenRecordset("SELECT dbo_SalesPerson.Username, dbo_SalesPerson.Manager, dbo_Prospects.ProspectID, dbo_Prospects.FN1, dbo_Prospects.MN1, dbo_Prospects.LN1, dbo_Prospects.CCity, dbo_Prospects.CState, dbo_Prospects.CZip, dbo_Prospects.Home, dbo_Prospects.Cell, dbo_Prospects.SalesPerson FROM dbo_Prospects INNER JOIN dbo_SalesPerson ON dbo_Prospects.SalesPerson = dbo_SalesPerson.SalesPerson WHERE (((dbo_SalesPerson.Username)='" & [Forms]![Switchboard]![txtUserID] & "'))", dbOpenDynaset, dbSeeChanges)
    
    'set controls to protect terminal server id
    Me.txtSalesperson.Value = Forms!Switchboard!txtSalesPersonID.Value
    Me.txtSalesperson.Locked = True
    Me.txtLotNo.Value = Forms!Switchboard!txtLotNo.Value
    Me.txtLotNo.Locked = True

        'set priveledges for Super User--access all lots and all salespersons
        If rs("Manager") = "Sup" Then
            Me.cboSalesperson.Enabled = True
            Me.cboLotNo.Enabled = True
            Me.optLot.Enabled = True
            Me.optSalesperson.Enabled = True
        End If
        
        'set priveledges for Manager User--access to all salespersons' data on that managers' lot
        If rs("Manager") = "Yes" Then
            Me.cboSalesperson.Enabled = True
            Me.cboLotNo.Enabled = False
            Me.optLot.Enabled = False
            Me.optSalesperson.Enabled = True
        End If
        
        'set priveldges for Salesperson User--access to own sales data only
        If rs("Manager") = "No" Then
            Me.cboSalesperson.Enabled = False
            Me.cboLotNo.Enabled = False
            Me.optLot.Enabled = False
            Me.optSalesperson.Enabled = False
        End If
        
        'Set rs2 = CurrentDb().OpenRecordset("Select dbo_Prospects.ProspectID, dbo_Prospects.FN1, dbo_Prospects.MN1, dbo_Prospects.LN1, dbo_Prospects.CCity, dbo_Prospects.CState, dbo_Prospects.CZip, dbo_Prospects.Home, dbo_Prospects.Cell, dbo_Prospects.SalesPerson from dbo_Prospects WHERE Salesperson = '" & Me.cboSalesperson & "' AND Lot ='" & Me.cboLotNo & "'" Order By dbo_Prospects.LN1, dbOpenDynaset, dbSeeChanges)
        Set rs2 = CurrentDb().OpenRecordset("Select dbo_Prospects.ProspectID, dbo_Prospects.FN1, dbo_Prospects.MN1, dbo_Prospects.LN1, dbo_Prospects.CCity, dbo_Prospects.CState, dbo_Prospects.CZip, dbo_Prospects.Home, dbo_Prospects.Cell, dbo_Prospects.SalesPerson from dbo_Prospects WHERE Salesperson = '" & Me.txtSalesperson & "' AND Lot ='" & Me.txtLotNo & "' Order By dbo_Prospects.LN1", dbOpenDynaset, dbSeeChanges)

            lstProspects.RowSource = ""
                Do While Not rs2.EOF
                    lstProspects.AddItem rs2("ProspectID") & ";" & rs2("LN1") & ";" & rs2("FN1") & ";" & rs2("MN1") & ";" & rs2("CCity") & ";" & rs2("CState") & ";" & rs2("CZip") & ";" & rs2("Home") & ";" & rs2("Cell") & ";" & rs2("Salesperson")
                    rs2.MoveNext
                Loop

    'close datasets
    rs.Close
    rs2.Close
        
End Sub

Private Sub Form_Load()

    Me.cboSalesperson.Value = Forms!Switchboard!txtSalesPersonID.Value
    Me.cboLotNo.Value = Forms!Switchboard!txtLotNo.Value

  'If addNew = False Then
  
    'Dim rs As Recordset
    'Dim rs2 As Recordset
    'Dim rs3 As Recordset
    'Dim rs4 as Recordset
    'Dim rs5 As Recordset
    
    
    'Set rs = CurrentDb().OpenRecordset("Select * from dbo_Prospects")
    'Set rs2 = CurrentDb().OpenRecordset("Select * from dbo_Deals")
    'Set rs3 = CurrentDb().OpenRecordset("Select * from dbo_DPFinance")
    'Set rs4 = CurrentDb().OpenRecordset("Select * from dbo_DPInventory")
    'Set rs5 = CurrentDb().OpenRecordset("Select * from dbo_DPInsurance")
    'Set rs6 = CurrentDb().OpenRecordset("Select * from dbo_SalesPerson")
    
    
    
    
    
        'rs.Open "select * from dbo_Prospects where ProspectID = '" & Forms!frmDealPkgMain!txtProspectID & "'", oconn, , adLockOptimistic
        'rs2.Open "select * from dbo_Deals where OrderNo='" & Forms!frmDealPkgMain!txtOrderID & "'", occon, adLockOptimistic
        'rs3.Open "select * from dbo_DPFinance where OrderNo='" & Forms!frmDealPkgMain!txtOrderID & "'", occon, adLockOptimistic
        'rs4.Open "select * from dbo_DPInventory where OrderNo='" & Forms!frmDealPkgMain!txtOrderID & "'", occon, adLockOptimistic
        'rs5.Open "select * from dbo_DPInsurance where OrderNo='" & Forms!frmDealPkgMain!txtOrderID & "'", occon, adLockOptimistic
        
        'populate fields
        'If Not rs.EOF Then
            'Me.txtProspectID.Value = rs("ProspectID")
            'Me.txtOrderID.Value = rs2("OrderNo")
            'Me.txtEntryDate = rs("InputDate")
            'Me.txtFN1 = rs("FN1")
            'Me.txtFN2 = rs("FN2")
            'Me.txtFN3 = rs("FN3")
            'Me.txtFN4 = rs("FN4")
            'Me.txtMN1 = rs("MN1")
            'Me.txtMN2 = rs("MN2")
            'Me.txtMN3 = rs("MN3")
            'Me.txtMN4 = rs("MN4")
            'Me.txtLN1 = rs("LN1")
            'Me.txtLN2 = rs("LN2")
            'Me.txtLN3 = rs("LN3")
            'Me.txtLN4 = rs("LN4")
            'Me.txtHome = rs("Home")
            'Me.txtCell = rs("Cell")
            'Me.txtOffice = rs("Office")
            'Me.txtEmail = rs("email")
            'Me.txtCurrSt = rs("CAddress")
            'Me.txtCurrLot = rs("CLotNo")
            'Me.txtCurrCity = rs("CCity")
            'Me.cboCurrState = rs("CState")
            'Me.txtCurrZip = rs("CZip")
            'Me.txtCurrCounty = rs("CCounty")
            'Me.txtDelSt = rs("DAddress")
            'Me.txtDelLot = rs("DLotNo")
            'Me.txtDelCity = rs("DCity")
            'Me.cboDelState = rs("DState")
            'Me.txtDelZip = rs("DZip")
            'Me.txtBuy1DOB = rs("Buyer1DOB")
            'Me.txtBuy2DOB = rs("Buyer2DOB")
            'Me.txtBuy3DOB = rs("Buyer3DOB")
            'Me.txtBuy4DOB = rs("Buyer4DOB")
            'Me.txtBuy1SSN = rs("SSN1")
            'Me.txtBuy2SSN = rs("SSN2")
            'Me.txtBuy3SSN = rs("SSN3")
            'Me.txtBuy4SSN = rs("SSN4")
            'Me.txtCurrRes = rs("CurrRes")
            'Me.txtOccupation = rs("Occupation")
            'Me.txtMaritalStatus = rs("Marital")
            'Me.txtHomeUse = rs("HomeUse")
            'Me.chkSpecialOrder = rs2("Special")
            'Me.cboStk = rs("STK1")
            'Me.txtHomeInfoNo = rs("NUM")
            'Me.txtHomeInfoSerialNo = rs2("SerialNo")
            'Me.txtNUR = rs2("NUR")
            'Me.txtSDT = rs2("SDT")
            'Me.txtHomeInfoManufacturer = rs2("MfgName")
            'Me.txtHomeInfoModel = rs2("Model")
            'Me.txtCarpet = rs2("Carpet")
            'Me.txtSiding = rs2("Vinyl")
            'Me.txtYear = rs2("Year")
            'Me.txtBR = rs2("BRNo")
            'Me.txtBA = rs2("BANo")
            'Me.txtFloorW = rs2("FW")
            'Me.txtFloorL = rs2("FL")
            'Me.txtHitchW = rs2("HW")
            'Me.txtHitchL = rs2("HL")
            'Me.txt2ASiteWorkTotal = rs2("SiteSTotal")
            'Me.txt2BOptEquipTotal = rs2("OptEQTotal")
            'Me.cboTaxableDeal = rs2("Taxable")
            'Me.txtTradeAllowance = rs2("TradeOver")
            'Me.txt3ACCTax = rs2("CandCTax")
            'Me.txt3BDocFees = rs2("DocFee")
            'Me.txt7ALocalTax = rs2("LocalTax")
            'Me.txt7BInstallPermit = rs2("AncorPermit")
            'Me.txt7CTitleFees = rs2("TitleFee")
            'Me.txt7DUCCFees = rs2("UCCFee")
            'Me.txt8BClosingCosts = rs2("REClosing")
            'Me.txt8CNontaxImprove = rs2("RENonTax")
            'Me.txt8DFinanceFees = rs2("FinFee")
            'Me.txtBasePrice = rs("Price1")
            'Me.txtSalesTaxHomeInfo = rs2("SalesTax")
            'Me.txtRealEstateHomeInfo = rs2("RealEstate")
            'Me.txtInsuranceHomeInfo = rs2("InsTotal")
            'Me.txtTotalPurchaseHomeInfo = rs2("TotalPurchase")
            'Me.cboDealType = rs3("DealType")
            'Me.cboOwnProperty = rs3("OwnProp")
            'Me.txtDownPayment = rs3("DownPay")
            'Me.chkTradeInFinancing = rs3("TradeIn")
            'Me.txtTradeAllowanceFinancing = rs3("TotalAllow")
            'Me.txtBalanceDueFinancing = rs3("BalDue")
            'Me.txtEquityFinancing = rs3("SiteAllow")
            'Me.txtOtherCredits1F = rs3("CreditOther1")
            'Me.txtOtherCr1Total = rs3("crOtherAmt1")
            'Me.txtOtherCredits2F = rs3("CreditOther2")
            'Me.txtOtherCr2Total = rs3("crOtherAmt2")
            'Me.cboLienholder = rs3("Leinholder")
            'Me.cboSubdivision = rs3("Subdivision")
            'Me.cboLender = rs3("Lender")
            'Me.txtRateFinancing = rs3("Rate")
            'Me.txtLotNoFinancing = rs3("LotNo")
            'Me.txtTermsFinancing = rs3("NumTerms")
            'Me.cboTermsFinancing = rs3("Term")
            'Me.txtGoodThroughFinancing = rs3("GoodThru")
            'Me.cboRangeMfg = rs4("RangeMfg")
            'Me.cboRangeSize = rs4("RangeSize")
            'Me.txtRangeSerial = rs4("RangeSerial")
            'Me.cboRefMfg = rs4("RefMfg")
            'Me.cboRefSize = rs4("RefSize")
            'Me.txtRefSerial = rs4("RefSerial")
            'Me.cboDishwasherMfg = rs4("DishMfg")
            'Me.cboDishSize = rs4("DishSize")
            'Me.txtDishSerial = rs4("DishSerial")
            'Me.cboMicrowaveMfg = rs4("MicroMfg")
            'Me.cboMicrowaveSize = rs4("MicroSize")
            'Me.txtMicrowaveSerial = rs4("MicroSerial")
            'Me.cboWasherMfg = rs4("WashMfg")
            'Me.cboWasherSize = rs4("WashSize")
            'Me.txtWasherSerial = rs4("WashSerial")
            'Me.cboDryerMfg = rs4("DryerMfg")
            'Me.cboDryerSize = rs4("DryerSize")
            'Me.txtDryerSerial = rs4("DryerSerial")
            'Me.cboAirUnitMfg = rs4("ACMfg")
            'Me.cboAirUnitSize = rs4("ACSize")
            'Me.txtAirUnitSerial = rs4("ACSerial")
            'Me.txtOtherDesc1 = rs4("Other1Desc")
            'Me.cboOtherMfg1 = rs4("Other1Mfg")
            'Me.cboOtherSize1 = rs4("Other1Size")
            'Me.txtOtherSerial1 = rs4("Other1Serial")
            'Me.txtOtherDesc2 = rs4("Other2Desc")
            'Me.cboOtherMfg2 = rs4("Other2Mfg")
            'Me.cboOtherSize2 = rs4("Other2Size")
            'Me.txtOtherSerial2 = rs4("Other2Serial")
            'Me.txtFireMiles = rs5("FireMiles")
            'Me.chk25less = rs5("TwentyFiveLess")
            'Me.chk26to50 = rs5("TwentySixFifty")
            'Me.chk50to100 = rs5("FiftyOneHundred")
            'Me.chk101orMore = rs5("OneHundredOne")
            'Me.chkNotInPark = rs5("NotInPark")
            'Me.chkUnknown = rs5("UnknownLocation")
            'Me.chkPermFoundQ = rs5("PermFound")
            'Me.chkOwnedClientQ = rs5("ClientOwned")
            'Me.chkCompositeRoofQ = rs5("CompositeRoof")
            'Me.chkProtSidingQ = rs5("ProtSiding")
            'Me.chkCityLimitsQ = rs5("InCityLimits")
            'Me.chkTiedDownQ = rs5("TiedDown")
            'Me.chkPrevTitledQ = rs5("PrevTitled")
            'Me.chkModHomeQ = rs5("ModHome")
            'Me.chkOnePay = rs5("OnePay")
            'Me.chkFourPay = rs5("FourPay")
            'Me.chkTenPay = rs5("TenPay")
            'Me.chkEZPay = rs5("EZPay")
            'Me.txtDwellLimit = rs5("DwellLimit")
            'Me.txtTerritory = rs5("Territory")
            'Me.txtDwellCode = rs5("DwellCode")
            'Me.txtDwellLOL = rs5("DwellLOL")
            'Me.txtDwellPrem = rs5("DwellPrem")
            'Me.txtPersPropCode = rs5("PerProCode")
            'Me.txtPersPropLOL = rs5("PerProLOL")
            'Me.txtPersPropPrem = rs5("PerProPrem")
            'Me.txtAdjCode = rs5("AdjStrucCode")
            'Me.txtAdjLOL = rs5("AdjStrucLOL")
            'Me.txtAdjPrem = rs5("AdjStrucPrem")
            'Me.txtPerLPLCode = rs5("PerLiabCode")
            'Me.txtPersLPLLOL = rs5("PerLiabLOL")
            'Me.txtPersLPLPrem = rs5("PerLiabPrem")
            'Me.txtOther1DescIns = rs5("InsO1Name")
            'Me.txtOther1CodeIns = rs5("InsO1Code")
            'Me.txtOther1LOLIns = rs5("InsO1LOL")
            'Me.txtOther1PremIns = rs5("InsO1Prem")
            'Me.txtOther2DesIns = rs5("InsO2Name")
            'Me.txtOther2CodeIns = rs5("InsO2Code")
            'Me.txtOther2LOLIns = rs5("InsO2LOL")
            'Me.txtOther2PremIns = rs5("InsO2Prem")
            'Me.txtOther3DescIns = rs5("InsO3Name")
            'Me.txtOther3CodeIns = rs5("InsO3Code")
            'Me.txtOtherLOL3Ins = rs5("InsO3LOL")
            'Me.txtOther3PremIns = rs5("InsO3Prem")
            'Me.cboCardTypeIns = rs5("CreditCard")
            'Me.txtCardNoIns = rs5("CCNumber")
            'Me.txtExpDateIns = rs5("CCExpDate")
            'Me.txtAmtChargedIns = rs5("AmtCharged")
            'Me.txtNameOnCardIns = rs5("NameCard")
            'Me.chkSuppHeatQ = rs5("SuppHeat")
            'Me.chkSHInstalledOtherQ = rs5("SuppHeatInstalled")
            'Me.chkDangerousPetsQ = rs5("ViciousPets")
            'Me.chkLocatedIslandQ = rs5("ThousandFtWater")
            'Me.chkAttachedStructuresQ = rs5("AttachedStructure")
            'Me.chkIncomeFarmQ = rs5("FarmIncome")
            'Me.chkPriorBrushfiresQ = rs5("PriorFireFloodLandslide")
            'Me.chkTwoOrMoreTheftQ = rs5("TwoMoreFiresTheft")
            'Me.txtSalesperson = rs("SalesPerson")
            
        'End If
 'End If
    
        
    

End Sub

Private Sub optLot_Click()

    'Dim rs As Recordset
    
    'If Me.optLot = True Then
        'Me.optSalesperson = False
        
        'Set rs = CurrentDb().OpenRecordset("Select * from dbo_SalesPerson WHERE LotNo ='" & Me.cboLotNo & "'", dbOpenDynaset, dbSeeChanges)
        
        'Me.cboSalesperson.RowSource = ""
            'Do While Not rs.EOF
                'cboSalesperson.AddItem rs("Salesperson")
                'rs.MoveNext
            'Loop
    'End If
    
    'rs.Close
    
    
End Sub

Private Sub optSalesperson_Click()

    'Dim rs As Recordset
    
    'If Me.optSalesperson = True Then
        'Me.optLot = False
        
        'Set rs = CurrentDb().OpenRecordset("Select * from dbo_SalesPerson WHERE SalesPerson ='" & Me.cboSalesperson & "'", dbOpenDynaset, dbSeeChanges)
            'Me.cboLotNo.RowSource = ""
            'Do While Not rs.EOF
                'cboLotNo.Value = rs("LotNo")
                'Me.cboLotNo.Requery
            'Loop
        
    'End If
    
    'rs.Close
    
    
End Sub

Private Sub txtTotalPurchaseHomeInfo_AfterUpdate()

    'Me.txtTotalPurchaseFinancing.Value = Me.txtTotalPurchaseHomeInfo.Value
    
End Sub

Private Sub txtTotalPurchaseHomeInfo_Enter()

    'Me.txtTotalPurchaseFinancing.Value = Me.txtTotalPurchaseHomeInfo.Value
    
End Sub

Answer : Problem with populating a combo box in access 2007

I am equally mystified about the 12 tables statement!

However,  what ever your current query is, the following approach should work.  Simply wrap your current statement up as an inline view :

Select ILV.Date, ILV.Description, ILV.CodeID, C.DescriptionCode
from
(
    your current query goes here
)  ILV
inner join Codes C on C.CodeID = ILV.CodeID
Random Solutions  
 
programming4us programming4us