G
Guest
I have a form that allows users to enter values into a table, which is then
the record source for a combo box elsewhere in the database. For
import/export purposes, I'd like to prevent users from entering anything with
an apostrophe, as that screws up the process. I just want the key disabled
for this form... I had the idea of assigning this code to the text box where
users enter the information:
Private Sub Charge_KeyPress(KeyAscii As Integer)
If KeyAscii = vb[Apostrophe?] Then
MsgBox "You may not use apostrophes in any fields"
End If
End Sub
For all I know, this might work if I can figure out what the apostrophe key
is called in VBA. Any thoughts? Is there some function in Access to do this
that I'm not aware of? TIA
the record source for a combo box elsewhere in the database. For
import/export purposes, I'd like to prevent users from entering anything with
an apostrophe, as that screws up the process. I just want the key disabled
for this form... I had the idea of assigning this code to the text box where
users enter the information:
Private Sub Charge_KeyPress(KeyAscii As Integer)
If KeyAscii = vb[Apostrophe?] Then
MsgBox "You may not use apostrophes in any fields"
End If
End Sub
For all I know, this might work if I can figure out what the apostrophe key
is called in VBA. Any thoughts? Is there some function in Access to do this
that I'm not aware of? TIA