Results 1 to 3 of 3
  1. #1
    The Professor is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2012
    Location
    Cambridgeshire, UK
    Posts
    67

    ComboBox on a SubForm

    Hi



    I have a combo box on a subform. From the cmbox (which was contructed with the Wizard) I can choose the Invoice Number from the dropdown list, which is then displayed in the cmbox, which is set to find the record for the Invoice Number picked. However the subform doesn't goto that Record. Yes, the cmbox displays the chosen Invoice Number, but the record doesn't change and all the information in the sunform remains as before.

    I'm a little baffled, because I have a similar cmbox on the Parent Form for picking the CustID, and this works a treat. I therefore assume my problem with the Invoice Number cmbox is related to it being on a subForm. How can I get the subform to jump to said record? Can anyone shed any light?

    Thanks,
    Prof.

  2. #2
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    The Subform Combobox will only navigate to the Subform Record if that Record is related to the Current Record in the Main Form; is that the situation, here? In other words, you can change the Record on the Main Form, and the Subform Records will change, accordingly, but you cannot do the reverse, with Wizard generated code. You cannot change the Subform Record and have the Main Form Record change, accordingly, which sounds like what you're trying to accomplish, here. To do this would require custom code, I believe.

    Linq ;0)>

  3. #3
    The Professor is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2012
    Location
    Cambridgeshire, UK
    Posts
    67
    Hi Linq,

    Yes, that's what I'm trying to do. The two tables (Customers & Invoice) are linked (one to many) via the CustID field. However, the Subform (Invoice table) has its own unique key field - InvoiceNumber. I'm trying (and failing) to change the Subform Record and via the invoice number (via a combo box) and thereby also change the Main Form Record, if required. Like you say, this doesn't seem possible with the limited power of the Wizard. Any idea where I might get a heads up on what is needed (code wise) to accomplish this?

    Regards,
    Prof.

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

Similar Threads

  1. Replies: 1
    Last Post: 09-06-2011, 01:47 PM
  2. Replies: 29
    Last Post: 08-16-2011, 05:52 PM
  3. using combobox on subform
    By 2whElr in forum Forms
    Replies: 7
    Last Post: 01-24-2011, 06:20 PM
  4. Replies: 0
    Last Post: 08-24-2010, 06:38 PM
  5. Replies: 0
    Last Post: 12-16-2009, 01:14 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