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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

text boxes afterupdate

Status
Not open for further replies.

DirtDawg

IS-IT--Management
Apr 17, 2002
218
JP
Hello,

Question if I have 1text box and input a number with a letter ex. 32e45. is it possible for a 2text box to find the e and input east into the 2text box.

N=north S=south and so on. the letter will not always be in the 3rd place though
 
Code:
Private Sub Text1_AfterUpdate()

  Dim strTemp As String
  
  strTemp = UCase(Me!Text1)
  
  If InStr(strTemp, "E") > 0 Then
    Me!Text2 = "East"
  ElseIf InStr(strTemp, "W") > 0 Then
    Me!Text2 = "West"
  ElseIf InStr(strTemp, "N") > 0 Then
    Me!Text2 = "North"
  ElseIf InStr(strTemp, "S") > 0 Then
    Me!Text2 = "South"
  End If
    
End Sub
VBSlammer
redinvader3walking.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top