Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 389789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:54:04+00:00 2026-05-12T15:54:04+00:00

From VBA I’m setting a series of text boxes to have DSum controlSources: Me.Oct.ControlSource

  • 0

From VBA I’m setting a series of text boxes to have DSum controlSources:

Me.Oct.ControlSource = "=DSum('GBPValue', _
                                'MF YTD Actual Income & Adret', _
                                'Month=10 AND Org_Type=[Key]')"
Me.Nov.ControlSource = "=DSum('GBPValue', _
                                'MF YTD Actual Income & Adret', _
                                'Month=11 AND Org_Type=[Key]')"

and then running Me.Recalc to get the values to show up once set. This works fine for the text boxes that are on-screen when the form loads but for ones on the same (very wide) form that are not currently on screen the Recalc seems to do nothing. If I scroll across the form and select the blank fields the values then show up. Is there any way to get the values for every text box on-screen or off to be there on form load or, at worst, when the user scrolled across?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T15:54:05+00:00Added an answer on May 12, 2026 at 3:54 pm

    I can guess why this must be happening: it’s likely that Recalc doesn’t repaint controls that are not currently visible. So even though the value of the controls has in fact changed, their cached visual appearance still appears empty when the scrolling windows reveals them.

    Here’s what I’d recommend: create a member function on your form like this:

    Function GetMonthValue(Month As Long) As Double
       GetMonthValue = DSum("GBPValue", "MF YTD Actual Income & Adret", _
                     "Month=" & Month & " AND Org_Type=" & [Key])
    End Function
    

    The control source for the text boxes can then be set to “=GetMonthValue(1)” and so on. This means that each control’s source is declared statically and there’s no need to change anything when the form loads. When the current record changes, the value should track, although I haven’t verified this with testing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm setting 12 TextBox ControlSources in my Form from VBA using the following :
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
I have a VBA Word Macro that gets words from .txt list and color
I have created a COM library in c# which I am consuming from VBA
I have a problem with calling the Match function from a VBA code: it
I have a simple C# function I wish to use from VBA. For the
I am attempting to send a message via sockets from VBA. I have made
How can I run a R script from VBA? Say I have a R
I have a working excel vba macro that does what I want from here
What is the best way to access a serial port from VBA? I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.