Results 1 to 11 of 11
  1. #1
    finsmith is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    27

    Cascading Combo boxes

    Sorry this got posted in the wrong forum.


    Hello Again.
    I am having an issue with my combo box. The code I am using is not populating my other boxes.
    attached is my database. and form.
    This is the code I am using for the combo box.
    It is not pulling in the data from the query.



    Private Sub Combo69_Change()
    Me.txtMATL_.Value = Me.Combo69.Column(1)
    Me.txtFINISH.Value = Me.Combo69.Column(2)


    End Sub

    I have several other fields that need to be filled in.
    I was hoping that this would work but it is not.
    Any other ideas by chanceblank (3).zip

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I can't look at the sample right now, but make sure the column count property of the combo is correct.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    finsmith is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    27
    it is correct. Ive been trying....
    ive also tried this too
    Private Sub Combo73_AfterUpdate()

    Me.txtFINISH = DLookup("parts_finish", "mml_lom_1", "parts_id = '" & Me.Combo73.Value & " '")

    Me.Combo73.Requery

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Are you sure you've enabled code or put the database in a trusted location? The code is working correctly for me.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    finsmith is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    27
    SH*T out of my a$$
    thanks baldy
    i want to go and cry now

    I was doing this


    Private Sub cbodescp_Change()
    Me.txtMatl.Value = Me.cbodescp.Column(1)
    Me.txtSPEC.Value = Me.cbodescp.Column(2)
    Me.txtManufacturer.Value = Me.cbodescp.Column(3)
    Me.txtMFG_MODEL_NO.Value = Me.cbodescp.Column(4)
    Me.txtELEC.Value = Me.cbodescp.Column(5)
    Me.txtFINISH.Value = Me.cbodescp.Column(6)
    Me.txtUNIT_WT_LBS.Value = Me.cbodescp.Column(7)



    will dlookup work for a web based form?
    I k now column does not

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Well, you can't have VBA in a web form. The column bit I think is fine, you just do it with a macro instead of VBA. The action is either SetValue or SetProperty, I can't remember which does it now (used to be SetValue).
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    Missinglinq's Avatar
    Missinglinq is online now VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by finsmith View Post

    ...will dlookup work for a web based form...
    I don't do that type of thing, but I believe that no VBA code works on web-based forms! I believe that I've read that you have to use all Embedded Macros, instead of code.

    I could be wrong; as I said, I don't do web-based apps!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  8. #8
    finsmith is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    27
    Going to revisit this. Does anyone know how this can be done in a web database?
    macros or using vb?

  9. #9
    Missinglinq's Avatar
    Missinglinq is online now VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    As Paul and I have said, you cannot use VBA code with web-based Forms. And unfortunately, from your standpoint, few of the experts, here, utilize Macros, with the exception of a specialized Macro named AutoExec, which fires when an Access Database first opens.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  10. #10
    finsmith is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    27

  11. #11
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I got no further than the first reply on the first thread. Albert probably knows more about web databases than the people at MS. I'd do whatever he recommended.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Cascading combo boxes
    By Jackie in forum Access
    Replies: 5
    Last Post: 07-26-2013, 09:07 AM
  2. Sum of Cascading Combo Boxes
    By alonewolf23 in forum Forms
    Replies: 2
    Last Post: 11-20-2011, 02:10 PM
  3. Cascading combo boxes
    By combine21 in forum Forms
    Replies: 3
    Last Post: 12-02-2010, 12:57 PM
  4. Cascading Combo Boxes
    By desireemm1 in forum Programming
    Replies: 1
    Last Post: 10-05-2009, 06:00 AM
  5. Cascading Combo Boxes
    By gjw1012 in forum Access
    Replies: 1
    Last Post: 07-25-2009, 04:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums