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 / May 2008

Tip: Looking for answers? Try searching our database.

Disabled Text Boxes Based on Value of Another Text Box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sherry N. - 22 May 2008 15:53 GMT
Hello,
I need to disable two of my text boxes  based on the value of another.
I want to use something like this but am sure I am not using the correct
syntax.

If Me.Branch_Code = "SFCO" Or "SFPA" Then
Me.RR_Rerun_Received.Enabled = False and Me.CR_Rerun_Received.Enabled = False
Else
Me.RR_Rerun_Received.Enabled = True and Me.CR_Rerun_Received.Enabled = True

End If

Great thanks.
Sherry N.
Julia B - 22 May 2008 16:00 GMT
Try:

If Me.Branch_Code.Text = "SFCO" Or Me.Branch_Code.Text = "SFPA" Then
     Me.RR_Rerun_Received.Enabled = False
     Me.CR_Rerun_Received.Enabled = False
Else
    Me.RR_Rerun_Received.Enabled = True
    Me.CR_Rerun_Received.Enabled = True
End If

Julia

> Hello,
> I need to disable two of my text boxes  based on the value of another.
[quoted text clipped - 10 lines]
> Great thanks.
> Sherry N.
Douglas J. Steele - 22 May 2008 16:17 GMT
Or, a little shorter,

 Me.RR_Rerun_Received.Enabled = _
   (Me.Branch_Code.Text <> "SFCO" And Me.Branch_Code.Text <> "SFPA")
 Me.CR_Rerun_Received.Enabled = _
   (Me.Branch_Code.Text <> "SFCO" And Me.Branch_Code.Text <> "SFPA")

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Try:
>
[quoted text clipped - 24 lines]
>> Great thanks.
>> Sherry N.
Sherry N. - 23 May 2008 11:31 GMT
Thanks but I am getting an error Method or data member not found for the
.Text? I am using this in the After Update property for the Branch Code Text
box. Could that be the problem?
Signature

Sherry N.

> Try:
>
[quoted text clipped - 22 lines]
> > Great thanks.
> > Sherry N.
Jan Baird - 27 May 2008 20:50 GMT
Jan Baird is out of the country until September 20.   Every effort will be
made to respond to messages, but please be patient.
 
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.