A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

problem in diabling the command button



 
 
Thread Tools Display Modes
  #1  
Old May 15th, 2004, 05:16 AM
Diable the command button
external usenet poster
 
Posts: n/a
Default problem in diabling the command button

I have a button on a form which I want to diable of the record is empty or a new one.

I have put following code in the Current event of form (it is a tabular form).

Even if the me.Canumber is Null (it is a string type) it is not diabling the COmman button, the code is as below.

Any help?

If Me.CANumber = Null Then Me.Command103.Enabled = False



  #2  
Old May 15th, 2004, 05:47 AM
tina
external usenet poster
 
Posts: n/a
Default problem in diabling the command button

try:

Me!Command103.Enabled = Not IsNull(Me!CANumber)

that will enable *and* disable the button, based on whether or not CANumber
contains a value.


"Diable the command button" wrote in
message ...
I have a button on a form which I want to diable of the record is empty or

a new one.

I have put following code in the Current event of form (it is a tabular

form).

Even if the me.Canumber is Null (it is a string type) it is not diabling

the COmman button, the code is as below.

Any help?

If Me.CANumber = Null Then Me.Command103.Enabled = False





  #3  
Old May 15th, 2004, 06:01 AM
Avir
external usenet poster
 
Posts: n/a
Default problem in diabling the command button

It works exactly the way I want.

Many thanks Tina!
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:23 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.