U Asked 4 This?
Home ] Access - Start Here ] Excel In Depth ] MS Office ] Visio Info ] Creating Web Pages ] Technical References ] Viruses ] Points of View ] Gadgets ] Just Links ] Monash ]

   Search this site or the web       powered by FreeFind
 
  Site search Web search

Participate in Ananda's Discussions
Post a message

Monitor page
for changes
    
   it's private  

by ChangeDetection

Up

People I meet, often ask for several simple features missing in Access. Sometimes, I say, "Can't be done", other times I say "You could do that if you programmed"...

Setting Names of People, Companies, Addresses to Proper Case

Dev Ashish wrote the authoritative article Capitalize first character of every word automatically. To put it in context of a text box on a form, this would be typical:

Assume the form thus:

Use the following VBA Code:

Private Sub chkConvertCase_AfterUpdate()
  ContactName_AfterUpdate
End Sub

Private Sub ContactName_AfterUpdate()
  If Me.chkConvertCase = True Then
    ContactName.Value = StrConv(ContactName.Value, vbProperCase)
  End If
End Sub

The checkbox allows you to defeat this feature at whim, for those names that don't follow Proper Case rules.

Making the Hyperlink field more intelligent

Private Sub emailaddress_AfterUpdate()
Dim stDisplayText As String
Dim stAddress As String
Dim stSubAddress As String
Dim strControlName As String
On Error GoTo Err_Label
  strControlName = "emailaddress" ' *** remember to ensure this is relevant name ***
  stDisplayText = HyperlinkPart(Me(strControlName), acDisplayText)
  stAddress = HyperlinkPart(Me(strControlName), acAddress)
  stSubAddress = HyperlinkPart(Me(strControlName), acSubAddress)
   If InStr(stAddress, "@") <> 0 Then
     If UCase$(Left$(stAddress, 7)) = "HTTP://" Then
         stAddress = Right$(stAddress, Len(stAddress) - 7)
         stAddress = "mailto:" & stAddress
     End If
  End If
   Me(strControlName) = stDisplayText & "#" & stAddress & "#" & stSubAddress
Exit_Label:
   Exit Sub
Err_Label:
   MsgBox Err.Description, vbExclamation, "Problem encountered. Error code : " & Err.Number
   Resume Exit_Label
End Sub

What do I do with those files ending in .zip?

You haven't heard of .zip files yet? Golly! .zip files are compressed files. We often use .zip files because we are stuck at a PC with this archaic thing called a 1.44Mb floppy and we have more than that amount of file and we can't fit even one on a floppy much less 5 times more.

Windows XP and Windows ME have built-in facilities to detect and transparently open a .zip file like it was a normal folder in Windows Explorer. Users of earlier Windows need utility programs that can unpack the .zip file into the many "real" files that it contains.

The most famous Windows Zip/Unzip program is Winzip. Winzip is uncrippled shareware which means (aside from the banner telling you so when it runs) you can use it until your guilt catches up with you. Lesser known are:

For a few francs, my favourite Swiss Army Knife utility of all time is Christian Ghisler's Total Commander (shareware) - it does lots of file management things as well as zip/unzip. If you buy it, tell him I sent you.