How can I refresh data in a calculated field on my main form after sub form data changes?

Hi,
I have created a database to store my bank transactions. On my main
form which is the default form to open when the database starts, I
have 2 subforms. One subform is for deposits and one is for
withdrawals. On the main form I have a calculated field that shows my
current balance. The problem is that after I have entered either a
deposit or withdrawal the new balance does not refresh.

The other problem is that I don't want to requery the main form
because the query behind it will always ask me for my password so that
it shows the information for the account I want to see, but this seems
to be the only way for me to refresh the balance field.

Can anyone please tell me how to refresh the data (not stored in a
table) in the balance field so that it will show the correct balance
after I enter any new information into my sub forms?

I am using Access 2007 in Windows Vista Home Premium.

0
d
9/5/2007 10:52:05 AM
access.forms 6864 articles. 2 followers. Follow

5 Replies
1228 Views

Similar Articles

[PageSpeed] 0

Requerying starts over, as you've found.

Have you tried adding code that calculates your "new balance" to the
AfterUpdate events of your "deposit" and "withdrawal" controls?

Have you tried using the Repaint method?

-- 
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

<d.barson@btinternet.com> wrote in message
news:1188989525.939937.186100@w3g2000hsg.googlegroups.com...
> Hi,
> I have created a database to store my bank transactions. On my main
> form which is the default form to open when the database starts, I
> have 2 subforms. One subform is for deposits and one is for
> withdrawals. On the main form I have a calculated field that shows my
> current balance. The problem is that after I have entered either a
> deposit or withdrawal the new balance does not refresh.
>
> The other problem is that I don't want to requery the main form
> because the query behind it will always ask me for my password so that
> it shows the information for the account I want to see, but this seems
> to be the only way for me to refresh the balance field.
>
> Can anyone please tell me how to refresh the data (not stored in a
> table) in the balance field so that it will show the correct balance
> after I enter any new information into my sub forms?
>
> I am using Access 2007 in Windows Vista Home Premium.
>

0
Jeff
9/5/2007 12:04:37 PM
On 5 Sep, 13:04, "Jeff Boyce" <JeffBoyce...@msn.com-
DISCARD_HYPHEN_TO_END> wrote:
> Requerying starts over, as you've found.
>
> Have you tried adding code that calculates your "new balance" to the
> AfterUpdate events of your "deposit" and "withdrawal" controls?
>
> Have you tried using the Repaint method?
>
> --
> Regards
>
> Jeff Boycewww.InformationFutures.net
>
> Microsoft Office/Access MVPhttp://mvp.support.microsoft.com/
>
> Microsoft IT Academy Program Mentorhttp://microsoftitacademy.com/
>
> <d.bar...@btinternet.com> wrote in message
>
> news:1188989525.939937.186100@w3g2000hsg.googlegroups.com...
>
>
>
> > Hi,
> > I have created a database to store my bank transactions. On my main
> > form which is the default form to open when the database starts, I
> > have 2 subforms. One subform is for deposits and one is for
> > withdrawals. On the main form I have a calculated field that shows my
> > current balance. The problem is that after I have entered either a
> > deposit or withdrawal the new balance does not refresh.
>
> > The other problem is that I don't want to requery the main form
> > because the query behind it will always ask me for my password so that
> > it shows the information for the account I want to see, but this seems
> > to be the only way for me to refresh the balance field.
>
> > Can anyone please tell me how to refresh the data (not stored in a
> > table) in the balance field so that it will show the correct balance
> > after I enter any new information into my sub forms?
>
> > I am using Access 2007 in Windows Vista Home Premium.- Hide quoted text -
>
> - Show quoted text -

Hi Jeff,

Yes I have tried the AfterUpdate method but this did not work. Never
heard of the Repaint method though. What do I need to do for Repaint?

Cheers

0
d
9/5/2007 12:32:01 PM
..Repaint instead of .Requery

-- 
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

<d.barson@btinternet.com> wrote in message
news:1188995521.448511.77280@57g2000hsv.googlegroups.com...
> On 5 Sep, 13:04, "Jeff Boyce" <JeffBoyce...@msn.com-
> DISCARD_HYPHEN_TO_END> wrote:
> > Requerying starts over, as you've found.
> >
> > Have you tried adding code that calculates your "new balance" to the
> > AfterUpdate events of your "deposit" and "withdrawal" controls?
> >
> > Have you tried using the Repaint method?
> >
> > --
> > Regards
> >
> > Jeff Boycewww.InformationFutures.net
> >
> > Microsoft Office/Access MVPhttp://mvp.support.microsoft.com/
> >
> > Microsoft IT Academy Program Mentorhttp://microsoftitacademy.com/
> >
> > <d.bar...@btinternet.com> wrote in message
> >
> > news:1188989525.939937.186100@w3g2000hsg.googlegroups.com...
> >
> >
> >
> > > Hi,
> > > I have created a database to store my bank transactions. On my main
> > > form which is the default form to open when the database starts, I
> > > have 2 subforms. One subform is for deposits and one is for
> > > withdrawals. On the main form I have a calculated field that shows my
> > > current balance. The problem is that after I have entered either a
> > > deposit or withdrawal the new balance does not refresh.
> >
> > > The other problem is that I don't want to requery the main form
> > > because the query behind it will always ask me for my password so that
> > > it shows the information for the account I want to see, but this seems
> > > to be the only way for me to refresh the balance field.
> >
> > > Can anyone please tell me how to refresh the data (not stored in a
> > > table) in the balance field so that it will show the correct balance
> > > after I enter any new information into my sub forms?
> >
> > > I am using Access 2007 in Windows Vista Home Premium.- Hide quoted
text -
> >
> > - Show quoted text -
>
> Hi Jeff,
>
> Yes I have tried the AfterUpdate method but this did not work. Never
> heard of the Repaint method though. What do I need to do for Repaint?
>
> Cheers
>

0
Jeff
9/5/2007 2:06:58 PM
On 5 Sep, 15:06, "Jeff Boyce" <JeffBoyce...@msn.com-
DISCARD_HYPHEN_TO_END> wrote:
> .Repaint instead of .Requery
>
> --
> Regards
>
> Jeff Boycewww.InformationFutures.net
>
> Microsoft Office/Access MVPhttp://mvp.support.microsoft.com/
>
> Microsoft IT Academy Program Mentorhttp://microsoftitacademy.com/
>
> <d.bar...@btinternet.com> wrote in message
>
> news:1188995521.448511.77280@57g2000hsv.googlegroups.com...
>
>
>
> > On 5 Sep, 13:04, "Jeff Boyce" <JeffBoyce...@msn.com-
> > DISCARD_HYPHEN_TO_END> wrote:
> > > Requerying starts over, as you've found.
>
> > > Have you tried adding code that calculates your "new balance" to the
> > > AfterUpdate events of your "deposit" and "withdrawal" controls?
>
> > > Have you tried using the Repaint method?
>
> > > --
> > > Regards
>
> > > Jeff Boycewww.InformationFutures.net
>
> > > Microsoft Office/Access MVPhttp://mvp.support.microsoft.com/
>
> > > Microsoft IT Academy Program Mentorhttp://microsoftitacademy.com/
>
> > > <d.bar...@btinternet.com> wrote in message
>
> > >news:1188989525.939937.186100@w3g2000hsg.googlegroups.com...
>
> > > > Hi,
> > > > I have created a database to store my bank transactions. On my main
> > > > form which is the default form to open when the database starts, I
> > > > have 2 subforms. One subform is for deposits and one is for
> > > > withdrawals. On the main form I have a calculated field that shows my
> > > > current balance. The problem is that after I have entered either a
> > > > deposit or withdrawal the new balance does not refresh.
>
> > > > The other problem is that I don't want to requery the main form
> > > > because the query behind it will always ask me for my password so that
> > > > it shows the information for the account I want to see, but this seems
> > > > to be the only way for me to refresh the balance field.
>
> > > > Can anyone please tell me how to refresh the data (not stored in a
> > > > table) in the balance field so that it will show the correct balance
> > > > after I enter any new information into my sub forms?
>
> > > > I am using Access 2007 in Windows Vista Home Premium.- Hide quoted
> text -
>
> > > - Show quoted text -
>
> > Hi Jeff,
>
> > Yes I have tried the AfterUpdate method but this did not work. Never
> > heard of the Repaint method though. What do I need to do for Repaint?
>
> > Cheers- Hide quoted text -
>
> - Show quoted text -

Sorry, this did not work either.

0
d
9/5/2007 3:07:02 PM
"...did not work..." doesn't give us many clues to go from.

Have you checked Access HELP for Requery, Repaint and/or Recalc?

-- 
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

<d.barson@btinternet.com> wrote in message
news:1189004822.335652.195650@w3g2000hsg.googlegroups.com...
> On 5 Sep, 15:06, "Jeff Boyce" <JeffBoyce...@msn.com-
> DISCARD_HYPHEN_TO_END> wrote:
> > .Repaint instead of .Requery
> >
> > --
> > Regards
> >
> > Jeff Boycewww.InformationFutures.net
> >
> > Microsoft Office/Access MVPhttp://mvp.support.microsoft.com/
> >
> > Microsoft IT Academy Program Mentorhttp://microsoftitacademy.com/
> >
> > <d.bar...@btinternet.com> wrote in message
> >
> > news:1188995521.448511.77280@57g2000hsv.googlegroups.com...
> >
> >
> >
> > > On 5 Sep, 13:04, "Jeff Boyce" <JeffBoyce...@msn.com-
> > > DISCARD_HYPHEN_TO_END> wrote:
> > > > Requerying starts over, as you've found.
> >
> > > > Have you tried adding code that calculates your "new balance" to the
> > > > AfterUpdate events of your "deposit" and "withdrawal" controls?
> >
> > > > Have you tried using the Repaint method?
> >
> > > > --
> > > > Regards
> >
> > > > Jeff Boycewww.InformationFutures.net
> >
> > > > Microsoft Office/Access MVPhttp://mvp.support.microsoft.com/
> >
> > > > Microsoft IT Academy Program Mentorhttp://microsoftitacademy.com/
> >
> > > > <d.bar...@btinternet.com> wrote in message
> >
> > > >news:1188989525.939937.186100@w3g2000hsg.googlegroups.com...
> >
> > > > > Hi,
> > > > > I have created a database to store my bank transactions. On my
main
> > > > > form which is the default form to open when the database starts, I
> > > > > have 2 subforms. One subform is for deposits and one is for
> > > > > withdrawals. On the main form I have a calculated field that shows
my
> > > > > current balance. The problem is that after I have entered either a
> > > > > deposit or withdrawal the new balance does not refresh.
> >
> > > > > The other problem is that I don't want to requery the main form
> > > > > because the query behind it will always ask me for my password so
that
> > > > > it shows the information for the account I want to see, but this
seems
> > > > > to be the only way for me to refresh the balance field.
> >
> > > > > Can anyone please tell me how to refresh the data (not stored in a
> > > > > table) in the balance field so that it will show the correct
balance
> > > > > after I enter any new information into my sub forms?
> >
> > > > > I am using Access 2007 in Windows Vista Home Premium.- Hide quoted
> > text -
> >
> > > > - Show quoted text -
> >
> > > Hi Jeff,
> >
> > > Yes I have tried the AfterUpdate method but this did not work. Never
> > > heard of the Repaint method though. What do I need to do for Repaint?
> >
> > > Cheers- Hide quoted text -
> >
> > - Show quoted text -
>
> Sorry, this did not work either.
>

0
Jeff
9/7/2007 12:01:46 PM
Reply:

Similar Artilces:

How do I get a formula to use data from a fixed location(NOT vicev
I want a formula to use data from a fixed location. For example I am using a table B2 to I4. During the week new value are added to the right of this table and then the table is shifted to the left. So a value in I4 becomes G4 etc. I want the formula to continue using I4 despite the fact it has been shifted but the formula automatically adjusts to read G4. IN SHORT Is there anyway to fix the formula to read a fixed physical location and not track the position of the cells? I know how to fix the value when the formula is moved(using $), but not how to fix the source for the formula. Anyon...

Change left bar and top bar names on Order screen
Ok, I guess this could be the left bar and top bar names for any screen, but I'm specifically asking about the Order screen. I have a client that wants to change "Create Invoice" at the top to "Close". They also want to change "Write-In Products" to "Write-In Rooms". Where do I change these? I don't see them as options in the customization screens, even in the N:1 and 1:N areas. On Sep 23, 2:18=A0pm, Wayne Walton <waynek...@gmail.com> wrote: > Ok, I guess this could be the left bar and top bar names for any > screen, but I'm ...

UI Data Validation using XML Schema
Has anybody done UI data validation usinf XML Schemas. Any pointers will help. Thanks! ...

How do I change a budgeted amount without changing previous budgets?
A newbie question I'm sure. My rent changed this month. When I change the budgeted amount, it changes (trashes) my budget for all previous months. How do change a budgeted amount for ONLY a specific time period? Thanks. Steve in Seattle ...

Change Names of Legend
Hello, I understand that you change the actual text that appears in the legend, not the font of it. I tried to follow the example given on this site and doesn't work. Here is the formula for one of the markers in the Chart. The formula refers to 2 markers on the chart. I would like one marker in the legend to be "plastic" and the other "hardware" =SERIES(,Sheet1!$C$2:$C$28,Sheet1!$B$2:$B$28,1) Thank you very much for your help. This is for a presentation due on Monday. -- Thank you... Elaine Normally I wouldn't reply, but since the real experts may be of...

forms/templates
how do you set up an email template and keep it for EVERY email. like branding? Please help!! For information on customizing the default Outlook forms, see http://www.outlookcode.com/d/forms.htm. -- Jocelyn Fiorello MVP - Outlook *** Messages sent to my e-mail address will NOT be answered -- please reply only to the newsgroup to preserve the message thread. *** "Barry" wrote: > how do you set up an email template and keep it for EVERY email. like > branding? Please help!! This would not be a suitable scenario for a custom form. Stationery = would be a better approac...

Change paths to linked external data
Hello. I have a database that has 3 external links in it: 1 is to a table in another Access Database. One is to an excel spread sheet. And, the third is to a .csv file. Is there a way in VBA to change the paths to these? Basically, i want to set up a form where the user can specify the new paths in text boxes if any of these files are moved. Anybody help me out? (Access 2007) cyb3rwolf wrote: >Hello. I have a database that has 3 external links in it: 1 is to a table >in another Access Database. One is to an excel spread sheet. And, the third >is to a .csv...

Can anyone send me the Microsoft.Crm.Platform.Proxy.dll and Microsoft.Crm.Platform.Types.dll files ?
Hi, I'm stucked without those files, and I don't have the instalation disk. Can anyone send me those files ? Thanks in advance, Eddie. You can download the program from Microsoft. http://www.microsoft.com/office/onenote/prodinfo/trial.mspx#EEAA Sorry-wrong group Eddie, email me and i will send them over -- John O'Donnell Microsoft CRM MVP http://www.mscrmfaq.us "Eddie" <Eddie@discussions.microsoft.com> wrote in message news:epJ2yF3NFHA.3076@tk2msftngp13.phx.gbl... > Hi, > > I'm stucked without those files...

Combo box filter before form opens
frmSearchType with cboType and cmdOpenForm which opens frmEntryEdit. frmEntryEdit uses cboEntryNum to allow user to select from the filtered records. This is working correctly, however if no records fit the filter, I get an open frmEntryEdit, with no records in the cboEntryNum. I would rather have a message box that states "No Data fits the criteria", than have frmEntry Edit open. Is this possible? -- Teach me to fish! Thanks for the help. Pax, M m stroup wrote: >frmSearchType with cboType and cmdOpenForm which opens frmEntryEdit. >frmEntryEdit use...

excel file can't be opened #2
hi,I'm cho I have a recent excel file (about 1 month),but since two days ago,the file can't be opened completely or always not responding. What should I do so that I can use this important file. Any help would be appreciated regards, cho ...

Something destroying Money data
My MS Money 2007 software was working fine, and then a few months ago, there were transactions missing. I went for backups, and it seemed every time I opened a MOney file there were fewer transactions--it was truly weird. Thinking a file had been accidentally deleted, I used a file recovery program and retrieved file and backup - also no data. So I just put the whole thing aside and out of mind, but tried again today and searched all partitions for mny and mbf files.. Same result, if anything fewer transactions. Is there some virus or other malware that eats Money files? I guess I can d...

Can't auto-complete e-mail addresses
Dear All, I just imported about 2000 contacts in my Outlook 2000 Address Book. Able to see them in the address book and create groups etc. But when i compose a new message and i try to enter some e-mail addresses in TO and then why do outlook do not give me suggestion to auto-complete them? I tried most of the settings. It wont work. What may be the problem? -Sameer Outlook 2000 has no such feature. Autocompletion didn't start until Outlook 2002. Versions of Outlook earlier than Outlook 2002 have a feature called auto-resolution. If you enter part of a name or a nickname then tab out o...

XML into DataSet
Hi. I need some help. I have an xml file what will contain hundreds of groups and will have an associated xsd. My overall goal is to have a web application that allows a user to input a groupID from a webform, the application will than find that groupID in the xml file and display all the related information for that group only. I have read my xml into a DataSet and have been able to successful find groupID and display some of the information for that particular group. But I have been unable to navigate to the groupsItems node and subsequently the details of each groupItem found in gro...

Can't restor backup file, "Please insert the next backup disk.....
I have money 2005 backup file (.mbf) and my original file has gotten corrupted somehow and can't repair it (computer hung and had to be restarted). Whenever I try to restor the backup file, I get the following message, Window Title: Money Multiple Disk Backup Message: Please insert the next backup disk. (The disk containing file "".) I was backing up on a different connected single harddrive and there is only one file. The file is not in multiple pieces and on different drives. When I click OK, it doesn't do anything and cancel just stops the process. I even down...

How can I shade area under a norm dist graph?
I have graphed a normal distribution curve. =Normdist(x,4,4,false) for x=-8 to +18 Now I would like to shade the areas where 8.5<x<12 and x<-3. That is, the left tail and a portion of the right tail. How do I do that? TimH - For one method, see http://www.mikemiddleton.com/ShadedNormalDensity.xls - Mike Middleton http://www.DecisionToolworks.com Decision Analysis Add-ins for Excel "TimH" <TimH@discussions.microsoft.com> wrote in message news:31235839-5F38-48E1-98EF-69A0BB22C634@microsoft.com... >I have graphed a normal distribution curve. =No...

Can't access comcast newsgroups in outlook express 6 or Outlook 2003
Hi, I had the comcast news server working in both aps, but trying to make it work with outlook 2003 as the default program to access the newsgroup reader, by removing the newsgroup account in outlook express 6, I now can't get it to connect in either ap. duh... It's completely gone from Outlook 2003, ie, where before, under the go button there was a link to news, now there is not. Outlook express 6 still has the newsgroup reader, that's how I'm sending this, but when i try to go to the comcast news server it repeatedly asks for my username and password. I deleted the a...

Form printing problem
Hi all, I have a form that holds customer records which we have been printing out for filing. I put a print record command button at the top of the form and this has been working perfectly for at least the last four years printing on plain paper using auto selection on the printer. Recently the form record has started printing onto header paper. It doesn't matter whether I change the properties on the printer it keeps printing to headed paper and the only way round was to put plain paper into the headed paper tray. We have now a new printer in the office which has been set as my defa...

HowTo add row to series data
1) insert row with ShiftDown 2) apply new data to the newly emptied cells 3) preserve original chart series range 1) after this code row 2 is empty cells Excel.Worksheet chart = (Excel.Worksheet)book.Worksheets["Chart Data"]; Excel.Range rngToday = chart.get_Range("A2", "D2"); rngToday.Insert(Excel.XlInsertShiftDirection.xlShiftDown); 2) this puts todays date into A2 rngToday.NumberFormat = "MM/dd"; rngToday.Value = DateTime.Today; 3) OOPS - the chart data is now A3..A7 because of the insert above How do I reset the souce data to A...

How can I create an invoicing database in Excel?
I would like to know how to create an invoicing database, or register in Excel. (Invoice + tax = total) Are there any templates free online? thanks How about a web search? http://office.microsoft.com/en-us/templates/default.aspx search for invoice -- Regards, Peo Sjoblom (No private emails please, for everyone's benefit keep the discussion in the newsgroup/forum) "Vcollins" <Vcollins@discussions.microsoft.com> wrote in message news:C46E9FE2-0B38-4468-9B00-126B7EE5C9A2@microsoft.com... >I would like to know how to create an invoicing database, or register in &...

can't add transfers to my budget
I have 3 accounts and I want to have 2 budget plans I want to have one "main" budget that has all my expenses, then another budget for my girlfriend and I's joint expenses. We have a joint account. I wanted to add the transfer from my checking into our joint account in my "main" budget. I have a group named "Transfers out of budget accounts" but I can't add anything to it or edit it. How can I accomplish this? I say one post here: http://umpmfaq.info/faq.txt that sounded hopeful, but when I tried to follow the instructions, nothing happened. Is t...

How to fit a MDI view to the main frame client area
Hi, Is there a simple way to fit an MDI view child frame to the application main frame window client area and handle the presence of a dockable toolbar in the main frame window? I have fudged it by sending an ID_WINDOW_TILE_VERT to the main frame window but that isnt quite what I want to do. TIA Jan You can use ActivateFrame on the child frame to maximize the child window. I am not sure why you are concerned about Toolbar in this case. --- Ajay "J M" <j_mill@jersymail.co.uk> wrote in message news:%233DV8zVkIHA.4196@TK2MSFTNGP04.phx.gbl... > Hi, > > Is there ...

how do I insert rows without changing formula
In a cashflow worksheet how can I add rows without having to re-do all the proceeding formulas. use absolute references e.g. =$A$5 -- HTH RP (remove nothere from the email address if mailing direct) "tinka" <tinka@discussions.microsoft.com> wrote in message news:4ED4569E-0FD6-469B-82B1-F30139B1A280@microsoft.com... > In a cashflow worksheet how can I add rows without having to re-do all the > proceeding formulas. ...

try again email forms
Hi there I have searched for the codes to email a form/report in a body of an email and have Access connect to MS outlook to choose who to email to. I have tried several different codes and do not understand code. None of the ones that I have tried worked. The last one I have tried is: Dim mess_body As String Dim appOutLook As Outlook.Application Dim MailOutLook As Outlook.MailItem Set appOutLook = CreateObject("Outlook.Application") Set MailOutLook = appOutLook.CreateItem(olMailItem) 'MsgBox (mess_body) mess_body = "The following Enrollment Form Order requires your...

Can you have a Territory without a manager ?
Can you have a Territory without a manager ? Is it required ? Yes you can have a Territory without a manager. Just a little tip, all required fields are indicated in red, bold letters and all business recommended (ie suggested you fill this information in) fields are indicated in blue, bold letters. Veronica. Program Manager Microsoft Business Solutions CRM "newbie" wrote: > Can you have a Territory without a manager ? > > Is it required ? > ...

error : can't find object or library
I got this error : can't find object or library whenever i try to enter some information into a cell. can someone advise how to get raid of it? thanks Hi, Try this it may work: Most likely, the application has lost the reference to an object or type library resulting in the above error. The problem may be resolved as follows: Open the database or application. Open a module in Design view or press ALT+F11 to switch to the Visual Basic Editor. On the Tools menu, click References. Clear the check box for the type library or object library marked as "Missing:" An alter...