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 / Forms Programming / June 2007

Tip: Looking for answers? Try searching our database.

whats wrong with my code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
balu - 11 Jun 2007 07:16 GMT
dear friends,
i have an Open_up form with many command buttons on its header.
form based on a fields  
                             1)   loginname
                              2)  password
  my code goes like this
  private sub form activate ()
 if is null(loginname) and isnull(password) then msgbox ("xyz")
 if password <> "balu" then msgbox("xyz")
 command1.enable = false
 else
command1.enable = true
end sub
 in fact what i want is to enable and disable the command buttons basing on
some conditins how and which events to use
luanhoxung@gmail.com - 11 Jun 2007 10:01 GMT
> dear friends,
>  i have an Open_up form with many command buttons on its header.
[quoted text clipped - 11 lines]
>   in fact what i want is to enable and disable the command buttons basing on
> some conditins how and which events to use

hi, Balu
I dont see "End If" in ur sub !
Luan
John W. Vinson - 11 Jun 2007 19:19 GMT
>dear friends,
> i have an Open_up form with many command buttons on its header.
[quoted text clipped - 11 lines]
>  in fact what i want is to enable and disable the command buttons basing on
>some conditins how and which events to use

Several things wrong. If you're referring to form controls, use

Me!loginname

rather than the undefined variable loginname. Secondly, in one place you have

is null(...
and in another
isnull(...

The function name is IsNull (with no space).

Putting the password in clear in your code makes this VERY insecure.

            John W. Vinson [MVP]
balu - 13 Jun 2007 07:44 GMT
great thanks for the advise,
kindly tell me which event to attach this code so that whenever the preset
conditions that go false at any stage of form operation command button should
disable and enable
(2) how to tally the preset password for an user.  an table it is like this
     table, users  
     field ,users  (text)
        "   password alloted (text)
     now on the open up form user will choose his name and type his alloted
password
     but how to crosscheck the password for the perticular user and thus
enable and disable the command buttons kindly help please.

 
   
   

> >dear friends,
> > i have an Open_up form with many command buttons on its header.
[quoted text clipped - 27 lines]
>
>              John W. Vinson [MVP]
 
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.