• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 269
  • Last Modified:

Access 2007

I have a main form that displays a subform below.  I would like for the subform to display what is entered on the main form immediately.  I have a save button on the main form and a add button is allow for multiple entries.  But, the subform does not update until I navigate completely out of the form and come back in.  Any help will be deeply appreciated.   Thanks.
0
EASCOA
Asked:
EASCOA
1 Solution
 
SolveEtCoagula07Commented:
If you post a copy of your database I can try to assist you.
0
 
Rey Obrero (Capricorn1)Commented:
0
 
EASCOAAuthor Commented:
The main input form is frmEnterUtilityCutsPermit and the tab that contains the form and subform I'm trying to get to work is "Repair Order".  There is one record in the repair table...I have been just adding a new record to the Repair Order and trying to get it to update the subform display.
ExpertHelp-Copy.accdb
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
mbizupCommented:
What exactly are you trying to display?

If your subforms are set up correctly, the key fields /linking fields from the main form will automatically populate in the subforms.
0
 
EASCOAAuthor Commented:
Actually the subform is created from a query that does some calculations from results entered and a couple of selections entered on the main form.  Do you think that is a problem?
0
 
EASCOAAuthor Commented:
Sorry to answer the question I want to display the results.
0
 
mbizupCommented:
Try this:

1. Create a new code module

2.  Add the following function to the module:

Function RequerySubform()
    Forms!frmEnterUtilityCutsPermit!frmChargeRatesSubform.Form.Requery
End Function

Open in new window


3.  Add the following command to the end of your macro for the Add button

Runcode RequerySubform()
0
 
EASCOAAuthor Commented:
Being new to Access 2007...I'm afraid I may have put the code in the wrong place.  Because it still doesn't work.  Sorry for any inconvenience.
COAStreet-2013-12-3StartOfDay-Sw.accdb
0
 
mbizupCommented:
Unless I'm looking at the wrong form entirely, I don't see where you have tried this at all.

Recapping the steps, with pictures below (Your user interface may look a little different.  The pictures are from Access 2010, but they should give you the right idea)

1. Create a new code module

2.  Add the following function to the module:

Function RequerySubform()
    Forms!frmEnterUtilityCutsPermit!frmChargeRatesSubform.Form.Requery
End Function

Open in new window


3.  Add the following command to the end of your macro for the Add button

Runcode RequerySubform()

Step 1: create a module
Step 2: Add the function to the module
Step 3:  Change the macro
0
 
EASCOAAuthor Commented:
Thanks for all the help.
0
 
mbizupCommented:
Glad to help.  Is this resolved for you now?
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now