Refresh on mainform/subform

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • P Mitchell

    #1

    Refresh on mainform/subform


    Hello

    I would like someone to be able to help with the updating of data in a
    lookup list in a subform. In short, is their a VB instruction that is the
    equivalent of performing the action of going to the menu and selecting
    Records and then Refresh?

    or

    To explain, based on a three table system where cars participate in rallies,
    which is a many to many relationship, between the Cars and Rallies tables,
    which is resolved by having a Races table.

    I have a menu/switchboard which contains a button that opens a
    mainform/subform.

    On the mainform/subform is a button to open a form to allow the entry of a
    new car into the Cars table.

    I realise this button could be placed on the Menu form, but for better or
    worse, if it is placed on the Mainform/Subform

    and one then uses the New Car form to enter the details of a new car

    and one then returns to the Mainform/Subform the new car appears in the
    lookup list (which is the foreign key field in the Races table, i.e.
    [Races.Engine #]), but if one repeats this process a 2nd time (or more),
    without closing the Mainform/Subform, the 2nd car does not appear in the
    lookup list. Selecting Records and then Refresh from the menu system updates
    the lookup list. But I have tried numerous instructions in VB when returning
    to the form, but I cannot find an instruction that matches Records and then
    Refresh. And where does one place the instruction? On Activate, On Got
    Focus, or ?????

    I have attached a zipped file containing a sample database.

    Thank you in anticipation for any assistance.

    Peter






Working...