Windows 10 Access office LTSC Professional plus 2021
I only make changes to our access program every year to so; therefore, my programming skills get rusty. I am struggling with a new task and I am sure that you can help me.
I have a form (call it form 1) which data comes from a table (call it table A). Form 1 has a number of fields but for this discussion we will call these fields STATE and CITY. These are not their real names but will make it easier to understand my problem. Employee 1 enters data into a number of the fields on form 1. Employee 2 then enters data into more fields including the field I am calling CITY and STATE. These two fields are entered using cascading combo boxes. So far everything is working well
The problem arises if employee 2 fails to enter data into these 2 fields or enters an empty string. Because of some legacy data and other complications, I cannot make these 2 fields required fields. My solution is to add a button (call it check for errors) to step through all the records in table A and locate those that have either a null value or an empty string. The last few days I have been struggling with my if statement and my do until end of file statement loop to find these errors.
I thought about posting my code here. But I recognize that it is written so amateurish that probably would be different for you to understand what I’m trying to do because I have added a number of MessageBox comments and other tools including commented out code that I have tried that did not work that it would be better if you could give me some sample code that will start me down the right track.
Any help would be welcome.