Wrox Programmer Forums
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 30th, 2007, 09:26 PM
Authorized User
Join Date: Mar 2007
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default Form Data Problem

Hi All,

Have been trying for a few days to get this going, but after several handfuls of hair i am still stuck.
I have a form which is based on a query, the query data is as follows. Field 1) contains import numbers and are Grouped by these numbers. Field 2) Contains a SumOfAmount for the $ value for the grouped import numbers. So data from the query looks like
Field1 SumOfAmount
12405 $32000
14567 $23000 and so on

On my form i have the field1 and sumOfAmount displayed, this form contains a subform which has the detail records for the query the main form is based on. So as the user selects a record in field1 the subfrm changes to display the details of each line that the (SumOfAmount) displays.

Now my problem. I require the end user to be able to edit data ($ Value) in the subform, this works ok, but the SumOfAmount does not recalc - refresh - requery regardless of what code i run on after update from the data entry field, or any other event i run. Does anyone know how i can refresh this (SumOfAmount) in real time, without having to close and reopen the form?

Thanks in Advance


Old May 2nd, 2007, 10:50 AM
Friend of Wrox
Join Date: Apr 2006
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts

Did you try to refresh it by using the On Current Event of the subform?

The value of Field1 you are selecting, is it in a combo box, or a list box? If not, what control are you using to select the value (text box with action button for exemple)?

Old May 2nd, 2007, 12:13 PM
Friend of Wrox
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts

You need to go to the subform's properties, and then on the Before Update event of the sub form, you need to requery the control with the SumOfAmount data.

Did that help?


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in e-mail structure sending data from data tiawebchd General .NET 3 May 5th, 2008 08:07 AM
posting form data as XML string problem Cragdo XML 0 July 16th, 2007 10:03 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.