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 6985925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:44:36+00:00 2026-05-27T18:44:36+00:00

All I want to do is set a textbox or label’s text to something

  • 0

All I want to do is set a textbox or label’s text to something dynamic when the report is opened with a click of a button in another form. I’ve solved everything except actually changing the text.

This code gives run-time error 2478 on SetFocus:

Me.tFilial.SetFocus
Me.tFilial.Text = filialen

Without SetFocus I get a run-time error saying the text can’t be changed without switching control to the control in question.

What is allowed where is always in question in Access, it seems. How do I solve this? Can I set the value on the buttonclick in the other form with

Reports![rptPressSchema]![tFilial].text="Hello"?

I would be happy to use a label instead, if that solves it. But the bottom line is I can try to do this every which way but I thought I’d ask you for advice as to best practice, as this must be a very common task indeed.

  • 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-27T18:44:36+00:00Added an answer on May 27, 2026 at 6:44 pm

    From the Access help:

    While the control has the focus, the Text property contains the text data currently in the control; the Value property contains the last saved data for the control. When you move the focus to another control, the control’s data is updated, and the Value property is set to this new value. The Text property setting is then unavailable until the control gets the focus again. If you use the Save Record command on the Records menu to save the data in the control without moving the focus, the Text property and Value property settings will be the same.

    Basically, the .Text property serves no purpose in a Report because individual controls cannot receive the focus. However, as @Remou stated in his comment, you can simply replace .Text with .Value and your code should work fine (no need to set focus when updating the value).

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

Sidebar

Related Questions

I want to set all the fields and labels on a VFP7 report to
I want to set the Expires header for all image/* and text/css . I'm
I have a base class for all my textboxes and I want to set
I want to get all values of a set interface in one go as
When @RadioServiceGroup is set to NULL, I want to return all the records from
All I want is to update an ListViewItem's text whithout seeing any flickering. This
What I want is simply that all my TextBoxes as by default set their
I have a form with multiple textbox and combox .When I click save &
I have an asp.net form . In this form I want to clear all
I want to disable a set of checkbox based on selection of one textbox

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.