If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Add "." to user's entry if they didn't
I have a Remarks section in my form for the user to type any additional info
pertinent to the file they are entering but it seems that about half of the time, they don't punctuate it with a final period. Is there a way that I can code it so that IF they didn't add that final "." that the system will? All of the data is later concatenated together which is why it matters. Thanks so much for any help! Pamela |
#2
|
|||
|
|||
Add "." to user's entry if they didn't
If Len(Me!txtRemarks & vbNullString) 0 Then
If Right(Me!txtRemarks, 1) "." Then Me!txtRemarks = Me!txtRemarks & "." End If End If Of course, that won't work if they ended the remarks with an exclamation point or a question mark... -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Pamela" wrote in message ... I have a Remarks section in my form for the user to type any additional info pertinent to the file they are entering but it seems that about half of the time, they don't punctuate it with a final period. Is there a way that I can code it so that IF they didn't add that final "." that the system will? All of the data is later concatenated together which is why it matters. Thanks so much for any help! Pamela |
#3
|
|||
|
|||
Add "." to user's entry if they didn't
In the "After Update" Event of your Remarks section, you could write
code like this: if Right(me.remarks, 1) "." then me.remarks = me.remarks & "." end if replace "remarks" with whatever your textbox is named. this will check to see if the last character is a period and will add one if not. hope that helps! |
Thread Tools | |
Display Modes | |
|
|