Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UCASE$ Function in Form and in Tables.... Is It Possible???? 1

Status
Not open for further replies.

Tarvish

Programmer
May 28, 2000
3
US
What I Want to do is when I type in A name in the Form or table make it all uniformed so it is easier to Filter for I tried to use the UCase$ in the Built in Functions but everytime I try to use the code for it I can't get it to Run Right. I Also want to make a Code To Block People From Changing my Code in Design View by having a Password Being Entered To Change it is That At All Possible?<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;All Help is greatly Appreciated,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tarvish<br>
 
As far as &quot;Ucase&quot; goes it will only work in VBA<br>So you need a form. <br>Explain what you are wanting to do<br>Have a user key in &quot;A&quot; or &quot;a&quot; and return all records that match. OR<br>Do you want to permanately convert all &quot;a&quot; to &quot;A&quot;<br><br>-----------------------------------<br>Second part of question:<br>It not possible do create a password for the code But...<br>The best way to block them from seeing your code is make a .MDE from your .mdb. You end up with two files yourdatabase.MDE and the original yourdatabase.MDB. The .mdb is where you change and update it, then you make another .MDE. So your users always use the .MDE. Once you create an .MDE it cannot be modified you have to modify the .MDB than re-compile it to make a new .MDE.<br><br>to do this:<br>Click &quot;Tools&quot; menu then &quot;Database Utilities&quot; then Make MDE<br>This of course will compile your database and Compact it to.<br>This is also recommended in a multiuser network Environment for controlling Database corruption. It absoultely elimnates it. The items that the use cannot see is CODE and change forms or reports. They can add a query or macro and add/change or delete records. Things they cannot do will be grayed out like clicking the &quot;Design Triangle&quot; to put a form or report in Design view.<br><br>Warning or NOTE:<br>Also you should create a third file called a Back End. yourdatabase_BE.mdb from you data or otherwise your users will key in new records in the .MDE and those records will not be in the original .MDB. Because they are actually 2 separate files they do hold separate data. So when you re-compile your .MDE it will overwrite the first .MDE and all of their new data. <br>But we have a quick fix for that too.<br><br>Click &quot;Tools&quot; &quot;Add-Ins&quot; &quot;Database Splitter&quot;<br>Follow prompts and that's it.<br>All of you tables will be attached so when you make a .MDE the data is actually stored in a third table that both the .MDE and .MDB are linking to.<br><br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
For UCase, either use an Input Mask: &gt;LLLLL&nbsp;&nbsp;etc....OR you could:<br><br>...in a form's field event:<br>Private Sub FirstName_KeyPress(KeyAscii As Integer)<br>On Error Resume Next<br>'CONVERT TO UPPER CASE<br>&nbsp;&nbsp;&nbsp;&nbsp;If KeyAscii &gt;= 97 And KeyAscii &lt;= 122 Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;KeyAscii = KeyAscii - 32<br>&nbsp;&nbsp;&nbsp;&nbsp;End If<br>End Sub<br><br>--Jim
 
Thanks Guys this really helped me.Is there anyway i can make it so all records even ones i did Make in lower case previous to the code being entered uniform?<br><br>You Guys did not understand my Password Question i see I will specify What i meant by it as to make it more clear for help..<br><br>What i wanted to do is Make it So The DesignView of all The Tabs could not be entered without a password i have seen it done before but do not know how it was done it might be wise as DougP said to make it into a .MDE but like he said whenever i need to change the code i would have to recompile it the Database i am working on is for Private use and Won't be used much so it does not make sense to Turn it into a .MDE As yet.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Thanks Guys again <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tarvish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top