Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / June 2007

Tip: Looking for answers? Try searching our database.

what is wrong with the code / which event to use

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
balu - 18 Jun 2007 08:14 GMT
i have an command button over an openup form to open an another form,
i want the form to enable and disable under conditions
 (1) whenver specified textboxes not filled /wrong data used
 (2) whenever typed data deleted
  how to get through this please
 i used, event form current()
           if isnull(text1) then msgbox("fg")
              command1.enable=false
   elseif isnull(condition2) theb msgbox("gh")
              command1.enable=false
 else command1.enable=true
  but the command1 is getting disabled but not getting enabled again?
Steve Schapel - 18 Jun 2007 11:01 GMT
Balu,

Try like this...

 If IsNull(Me.text1) Then
    MsgBox "fg"
    Me.Command1.Enabled = False
 ElseIf IsNull(condition2) Then
    MsgBox "gh"
    Me.Command1.Enabled = False
 Else
    Me.Command1.Enabled = True
 End If

Signature

Steve Schapel, Microsoft Access MVP

>  i have an command button over an openup form to open an another form,
>  i want the form to enable and disable under conditions
[quoted text clipped - 8 lines]
>   else command1.enable=true
>    but the command1 is getting disabled but not getting enabled again?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.