Results 1 to 7 of 7

Thread: [RESOLVED] Filling a ComboBox with a Recordset: Error 3265

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    95

    Resolved [RESOLVED] Filling a ComboBox with a Recordset: Error 3265

    Visual Basic Segment:

    VB Code:
    1. With rsTipModels
    2.          Me.Combo_Option_Selection_Tip_Model_Type.Clear
    3.          While Not .EOF
    4.  
    5.             MsgBox .Fields(!MODEL_NUMBER)                       'A) Same Error
    6.             MsgBox .Fields("MODEL_NUMBER").Value              'B) Same Error
    7.             MsgBox .Fields(!MODEL_NUMBER)                       'C) Same Error
    8.             MsgBox .Fields("MODEL_NUMBER").Value              'D) Same Error
    9.             Me.Combo_Option_Selection_Tip_Model_Type _    'E) Same Error
    10.                .AddItem .Fields("MODEL_NUMBER").Value
    11.  
    12.  
    13.             .MoveNext
    14.          Wend
    15.       End With

    I thought I had this figured out. Unfortuanaly, I lost the source I was using to figure it out and can't find it again.

    Help!
    Thanks,

  2. #2
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Filling a ComboBox with a Recordset: Error 3265

    are u sure thats the correct name of the field? because Error 3265 mean it cannot find the field u are referring too
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  3. #3
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Filling a ComboBox with a Recordset: Error 3265

    If Error 3265 stands for

    "Item cannot be found in the collection corresponding to the requested name or ordinal"

    then it's very self-explanatory: field name "MODEL_NUMBER" in your recordset does not exist. Check your sql statement (if you selecting it) or actual table (for existence).

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    95

    Re: Filling a ComboBox with a Recordset: Error 3265

    MODLE_NUMBER is the spelling in the DB. Thanks.. and I thought I was just loosing my mind.

  5. #5
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: Filling a ComboBox with a Recordset: Error 3265

    Use

    MsgBox .Fields(MODEL_NUMBER)

    or rs!MODEL_NUMBER if I'm not mistaken

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    95

    Re: Filling a ComboBox with a Recordset: Error 3265

    VB Code:
    1. With rsTipModels
    2.          Me.Combo_Option_Selection_Tip_Model_Type.Clear
    3.          While Not .EOF
    4.             If (.Fields("MODEL_NUMBER") & "") <> "" Then
    5.                Me.Combo_Option_Selection_Tip_Model_Type.AddItem .Fields("MODEL_NUMBER").Value
    6.             End If
    7.             .MoveNext
    8.          Wend
    9.       End With

    works Great!

  7. #7

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width