Solved

Access 2007

Posted on 2013-12-03
11
255 Views
Last Modified: 2013-12-04
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
Comment
Question by:EASCOA
11 Comments
 
LVL 1

Expert Comment

by:SolveEtCoagula07
ID: 39693460
If you post a copy of your database I can try to assist you.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39693470
0
 

Author Comment

by:EASCOA
ID: 39693583
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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 61

Expert Comment

by:mbizup
ID: 39693585
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
 

Author Comment

by:EASCOA
ID: 39693614
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
 

Author Comment

by:EASCOA
ID: 39693618
Sorry to answer the question I want to display the results.
0
 
LVL 61

Expert Comment

by:mbizup
ID: 39693632
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
 

Author Comment

by:EASCOA
ID: 39693740
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
 
LVL 61

Expert Comment

by:mbizup
ID: 39693782
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
 

Author Comment

by:EASCOA
ID: 39693921
Thanks for all the help.
0
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 39694209
Glad to help.  Is this resolved for you now?
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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…

856 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