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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:26:01+00:00 2026-06-04T18:26:01+00:00

I have a textbox on an access form that I would like to enable

  • 0

I have a textbox on an access form that I would like to enable for edditing if the textbox is blank. I am new to VBA, and am uncertain of the best way to go about it. Using a double-click event would be fine with me, but I would prefer to do it on load.

I have tried the following code, but can’t seem to get it to work. Any help would be appreciated.

Private Sub EmpID_DblClick(Cancel As Integer)
If EmpID.Text = "" Then
    Me.EmpID.Enabled = True
End If
End Sub
  • 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-06-04T18:26:02+00:00Added an answer on June 4, 2026 at 6:26 pm

    For things that should happen on a per record basis, you are best off using the current event. Do not use the .Text property for controls. If you must use a property, use .Value. The .Text property is only available when the control has focus and is generally only used in special cases such as the Change event.

    Private Sub Form_Current()
      If IsNull(EmpID) Then
        Me.EmpID.Enabled = True
      End If
    End Sub
    

    In a normal set-up, there is no chance of the control being equal to a zero-length string (“”)

    You can cover all bases by saying:

    Trim(EmpID & "") = ""
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to have direct access to the text inside a textbox on
I have a textbox on a MS Access form that users are going to
I have an Access form with a textbox that is uses as an expression
I have a form that users fill in. According to the level of access
I have a main form that contains two other child subforms. When a textbox
Ok, so I have a Microsoft Access form which contains a textbox which I
If I have .Net Form with a component/object such as a textbox that I
I would like my program to be able to access a website that processes
I have a simple MS Access form that has 3 objects: a text box,
I am currently trying to improve on an Access Database VBA that 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.