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 2005

Tip: Looking for answers? Try searching our database.

Read-Only Text box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Darren - 04 May 2005 09:21 GMT
I have been using the following code to convert all text to upper case. It
works in all my text boxes except one.

Private Sub Name_AfterUpdate()
Name = StrConv(Name, vbUpperCase)
End Sub

In the text box Name if I enter a value Get an error message saying that the
text box is read only and cannot do the conversion.

Where can I change the read-only property?  
Nikos Yannacopoulos - 04 May 2005 11:39 GMT
Darren,

I suspect your problem is the name of the textbox! Are you getting error
2135 (This property is read-only and can't be set)?

Name is a reserved keyword in Jet; as a matter of fact, each and every
object in Access has a Name property, including the form whose name you
are trying to change in your code - this is what Access is not letting
you do!

One solution is to make an explicit reference to the textbox, like:

Me.Controls("Name") = StrConv(Me.Controls("Name"), vbUpperCase)

but this is only a half measure. The best thing to do is to use a
different textbox name.

Here's a list of reserved keywords in Jet:

http://support.microsoft.com/default.aspx?scid=kb;en-us;321266

HTH,
Nikos

> I have been using the following code to convert all text to upper case. It
> works in all my text boxes except one.
[quoted text clipped - 7 lines]
>
> Where can I change the read-only property?  
 
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.