![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi All, I trying to setup a validation rule on a table field and I don't seem to be able to get it to work. I have the field define as number so I need to detect/capture/display message when a user enters a text character. Yes, Access does this but the message it displays will not be useful or helpful to the end-users so I need to replace it with something that will make sense. On the form when I enter a text into the control and press enter, the following access message appears; The value you entered isn't valid for this field. For example, you may have entered text in a numeric field or a number that is larger than the FieldSize setting permits. I don't think this is a trapable error message at the form level so I thought I would set a field validation rule on that field in the table. All my attempts so far have not worked. I've also tried several different events on the form but this message always appears when trying to solve this at the form level. so, what is the actual syntax for the field validation rule that would check to be sure the entry is numeric or is not text thanks bobh. |
#3
| |||
| |||
|
|
Hi All, I trying to setup a validation rule on a table field and I don't seem to be able to get it to work. I have the field define as number so I need to detect/capture/display message when a user enters a text character. Yes, Access does this but the message it displays will not be useful or helpful to the end-users so I need to replace it with something that will make sense. On the form when I enter a text into the control and press enter, the following access message appears; The value you entered isn't valid for this field. For example, you may have entered text in a numeric field or a number that is larger than the FieldSize setting permits. I don't think this is a trapable error message at the form level so I thought I would set a field validation rule on that field in the table. All my attempts so far have not worked. I've also tried several different events on the form but this message always appears when trying to solve this at the form level. so, what is the actual syntax for the field validation rule that would check to be sure the entry is numeric or is not text thanks bobh. |
#4
| |||
| |||
|
|
Hi All, I trying to setup a validation rule on a table field and I don't seem to be able to get it to work. I have the field define as number so I need to detect/capture/display message when a user enters a text character. Yes, Access does this but the message it displays will not be useful or helpful to the end-users so I need to replace it with something that will make sense. On the form when I enter a text into the control and press enter, the following access message appears; The value you entered isn't valid for this field. For example, you may have entered text in a numeric field or a number that is larger than the FieldSize setting permits. I don't think this is a trapable error message at the form level so I thought I would set a field validation rule on that field in the table. All my attempts so far have not worked. I've also tried several different events on the form but this message always appears when trying to solve this at the form level. so, what is the actual syntax for the field validation rule that would check to be sure the entry is numeric or is not text thanks bobh. |
#5
| |||
| |||
|
|
Hi All, I trying to setup a validation rule on a table field and I don't seem to be able to get it to work. I have the field define as number so I need to detect/capture/display message when a user enters a text character. Yes, Access does this but the message it displays will not be useful or helpful to the end-users so I need to replace it with something that will make sense. On the form when I enter a text into the control and press enter, the following access message appears; The value you entered isn't valid for this field. For example, you may have entered text in a numeric field or a number that is larger than the FieldSize setting permits. I don't think this is a trapable error message at the form level so I thought I would set a field validation rule on that field in the table. All my attempts so far have not worked. I've also tried several different events on the form but this message always appears when trying to solve this at the form level. so, what is the actual syntax for the field validation rule that would check to be sure the entry is numeric or is not text thanks bobh. |
#6
| |||
| |||
|
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 You can use the TextBox's KeyDown event - something like this: Private Sub Text0_KeyDown(KeyCode As Integer, Shift As Integer) If (KeyCode >= vbKeyA And KeyCode <= vbKeyZ) Then MsgBox "Outside acceptable characters", vbCritical KeyCode = 0 End If End Sub -- MGFoster:::mgf00 <at> earthlink <decimal-point> net Oakland, CA (USA) ** Respond only to this newsgroup. I DO NOT respond to emails ** -----BEGIN PGP SIGNATURE----- Version: PGP for Personal Privacy 5.0 Charset: noconv iQA/AwUBSX9b44echKqOuFEgEQJP4ACfbRFHKfMqFk994CjyJDm6Zl E1akYAn0AB YAsEw/FlW2X9aZ84U9xvmLv0 =5/gg -----END PGP SIGNATURE----- bobh wrote: Hi All, I trying to setup a validation rule on a table field and I don't seem to be able to get it to work. I have the field define as number so I need to detect/capture/display message when a user enters a text character. Yes, Access does this but the message it displays will not be useful or helpful to the end-users so I need to replace it with something that will make sense. On the form when I enter a text into the control and press enter, the following access message appears; The value you entered isn't valid for this field. For example, you may have entered text in a numeric field or a number that is larger than the FieldSize setting permits. I don't think this is a trapable error message at the form level so I thought I would set a field validation rule on that field in the table. All my attempts so far have not worked. I've also tried several different events on the form but this message always appears when trying to solve this at the form level. so, what is the actual syntax for the field validation rule that would check to be sure the entry is numeric or is not text thanks bobh. |
#7
| |||
| |||
|
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 You can use the TextBox's KeyDown event - something like this: Private Sub Text0_KeyDown(KeyCode As Integer, Shift As Integer) * * *If (KeyCode >= vbKeyA And KeyCode <= vbKeyZ) Then * * * * *MsgBox "Outside acceptable characters", vbCritical * * * * *KeyCode = 0 * * *End If End Sub -- MGFoster:::mgf00 <at> earthlink <decimal-point> net Oakland, CA (USA) ** Respond only to this newsgroup. *I DO NOT respond to emails ** -----BEGIN PGP SIGNATURE----- Version: PGP for Personal Privacy 5.0 Charset: noconv iQA/AwUBSX9b44echKqOuFEgEQJP4ACfbRFHKfMqFk994CjyJDm6Zl E1akYAn0AB YAsEw/FlW2X9aZ84U9xvmLv0 =5/gg -----END PGP SIGNATURE----- bobhwrote: Hi All, I trying to setup a validation rule on a table field and I don't seem to be able to get it to work. I have the field define as number so I need to detect/capture/display message when a user enters a text character. Yes, Access does this but the message it displays will not be useful or helpful to the end-users so I need to replace it with something that will make sense. On the form when I enter a text into the control and press enter, the following access message appears; The value you entered isn't valid for this field. For example, you may have entered text in a numeric field or a number that is larger than the FieldSize setting permits. I don't think this is a trapable error message at the form level so I thought I would set a field validation rule on that field in the table. All my attempts so far have not worked. I've also tried several different events on the form but this message always appears when trying to solve this at the form level. so, what is the actual syntax for the field validation rule that would check to be sure the entry is numeric or is not text thanks bobh.- Hide quoted text - - Show quoted text - |
![]() |
| Thread Tools | |
| Display Modes | |
| |