Can a combobox be requeried when a textbox value changes on a form?

Posted on 2011-04-20
Last Modified: 2012-08-13
Ok, I'm sure this will get confusing.  I'll do my best to explain.  I have a form which work fine when a new record is created with the form.  On the form in a combobox when when used, populates various fields via...      

Me.txtNumUp = Me.cboProdType.Column(1)
Me.txtPrintSides = Me.cboProdType.Column(2)
Me.txtNumPgsPerPressSheet = Me.cboProdType.Column(3)

Also on this form is a text box that the user enters a qty into.  When the user enters a number in this field, various calculations are done in the form using some of the values in fields that were populated by the combobox..

However, when this form is used to edit an existing record, and if the user changes the value in the text box, some fields don't re-calculate.  Its almost as if the combobox needs to be dealt with again even if we don't want the value in the combobox to change.  To prove this I've manually selected the same record from the combobox and all works just fine.

So, if I've explained this well enough can anyone help?  Is there a way to automatically have the system select the record from the combobox behind the sceness or something?


Question by:SteveL13
    LVL 119

    Accepted Solution

    try calling the combo box afterupdate event in the afterupdate event of the textbox

    private sub textbox_afterupdate()


    end sub

    Author Closing Comment

    Thank you!

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
    A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
    Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now