I have a form on which I need some help.
1) I am validating an input field against an existing table and displaying an error message if the data entered doens't exist in the table. This works fine. The problem is, that once I respond ok to the error message, the cursor moves to the next field. I want the cursor to remain in the field that is in error.
2) I have another field in which I enter a number and do a lookup against a table that contains the names of all the states. What I want to do is to display the name of the state from the table in a text field on the form. My validation routine is working but I cannot get the name of the state to display.
As I mentioned in the subject line, I am new to Access but have 25+ years programming experience on legacy systems. I could write this in no time at all using what I am familiar with, but that isn't possible. The Access classes that I have taken are no help at all in this real life situation. Nothing like this was even covered. Any help is greatly appreciated.
1) I am validating an input field against an existing table and displaying an error message if the data entered doens't exist in the table. This works fine. The problem is, that once I respond ok to the error message, the cursor moves to the next field. I want the cursor to remain in the field that is in error.
2) I have another field in which I enter a number and do a lookup against a table that contains the names of all the states. What I want to do is to display the name of the state from the table in a text field on the form. My validation routine is working but I cannot get the name of the state to display.
As I mentioned in the subject line, I am new to Access but have 25+ years programming experience on legacy systems. I could write this in no time at all using what I am familiar with, but that isn't possible. The Access classes that I have taken are no help at all in this real life situation. Nothing like this was even covered. Any help is greatly appreciated.