473,406 Members | 2,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Disable a Command Button

Within the form “frmIncidentForm” I have a textbox and a command button.

I would like to disable the “AddIncident” button when the “IncidentID”
textbox is NOT empty. If possible I would like the code in the Forms Event
“On Current”.

Thanks

--
Message posted via http://www.accessmonster.com

Jan 10 '08 #1
3 5807
pushrodengine via AccessMonster.com wrote:
Within the form “frmIncidentForm” I have a textbox and a command button.

I would like to disable the “AddIncident” button when the “IncidentID”
textbox is NOT empty. If possible I would like the code in the Forms Event
“On Current”.

Thanks
In the OnCurrent event enter
Me.AddIncident.Enabled = (IsNull(Me.IncidentID))

Nymphs
http://www.youtube.com/watch?v=gg7WG6tCbrw

Jan 10 '08 #2
"Salad" <oi*@vinegar.comwrote in message
news:13*************@corp.supernews.com...
pushrodengine via AccessMonster.com wrote:
>Within the form "frmIncidentForm" I have a textbox and a command button.
I would like to disable the "AddIncident" button when the "IncidentID"
textbox is NOT empty. If possible I would like the code in the Forms
Event
"On Current".

Thanks

In the OnCurrent event enter
Me.AddIncident.Enabled = (IsNull(Me.IncidentID))
You might also consider adding some code in the AddIncident_AfterUpdate
event to disable the button when somebody puts data into the AddIncident
textbox.
Fred Zuckerman
Jan 10 '08 #3
Thank you for your help!

--
Message posted via http://www.accessmonster.com

Jan 11 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: nntp | last post by:
I have a set of links which I want search engines to crawl them, but I want to disable them from my visitors, so I will ask the link owners to pay me to let me enable them. <a disabled...
3
by: bonehead | last post by:
Okay, here's a question I should have posted a very very long time ago. I'd like to prevent the user from being able to bypass certain error handling and updating functions that are programmed into...
0
by: Big John | last post by:
I have not been able to successfully code a toggle button to enable /disable a record filter on a form.... I have been able to put seperate a button that will enable a record filter but cannot get...
16
by: MLH | last post by:
In Access 97 and Access 2.0 applications, if a command button has the focus, the spacebar will 'PRESS" the key. How does one go about disabling this annoying BEATURE?
0
by: Ahmad Jalil Qarshi | last post by:
Hi! I have a problem while developing some webpages.The Problem is that:- How We Can Disable The Controls Of One Web Form From Other Web Form In Asp.net? Explanation:- There Should Be Two...
0
by: Nick 'The Database Guy' | last post by:
Hi Guys, When my database opens it run the following code. Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long Private Declare Function...
3
by: CanuckChuck | last post by:
I have a code for enabling a command button to password protect the enabling/disabling of the Shift bypass. For some reason though I keep recieving a syntax error when I try to use it. I copied the...
8
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I disable the right mouse button? -----------------------------------------------------------------------...
3
convexcube
by: convexcube | last post by:
Hi everyone, Now that I've found a way to disable the ribbon etc. I need to disable the application maximize button. I have looked at this post and implemented it, but it disables the close and...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.