bluenose83
New Member
- Joined
- Aug 6, 2008
- Messages
- 41
Afternoon everyone. Struggling with a bit of validation so ill try to explain my situation. Also apologies, I am still trying to understand Access.
I have built a simple database which has a Input screen. The user keys on a form into a load of fields the information and hits submit. This then writes to the table in the back ground. This form has validation in each of its boxes. So for example, there is a drop down which will only accept a Y or N. Another will only accept a bank account which is 8 digits long, anything more or less an error message pops up. This is ok for the user when they have a couple to input at a time. Sometimes we get requests to key say 100 into the database so I have been coming up with a upload query that will write to the table.
So the user provides a excel spreadsheet with all the information on. This is then imported into access and into another table I have called tbl_import. They click a button and it copies whats in this table to the main table.
As it stands, It will copy anything to the main table (even incorrect data) so I have been attempting to add to my query some validation that will stop the query before it copies across. My first attempts have just copied anyway and nothing has been flagged.
I have tried adding to the criteria, <>"Y" OR <>"N". Also tried just listing them going down.
The validation for bank account on my form is Len([Bank_Account])=8 but I have tried adding this to the query but again doesn't work.
First of all is this possible to do? will the query look at all the items in the columns? Or am I going to have to add code (something I have no idea about really).
I have built a simple database which has a Input screen. The user keys on a form into a load of fields the information and hits submit. This then writes to the table in the back ground. This form has validation in each of its boxes. So for example, there is a drop down which will only accept a Y or N. Another will only accept a bank account which is 8 digits long, anything more or less an error message pops up. This is ok for the user when they have a couple to input at a time. Sometimes we get requests to key say 100 into the database so I have been coming up with a upload query that will write to the table.
So the user provides a excel spreadsheet with all the information on. This is then imported into access and into another table I have called tbl_import. They click a button and it copies whats in this table to the main table.
As it stands, It will copy anything to the main table (even incorrect data) so I have been attempting to add to my query some validation that will stop the query before it copies across. My first attempts have just copied anyway and nothing has been flagged.
I have tried adding to the criteria, <>"Y" OR <>"N". Also tried just listing them going down.
The validation for bank account on my form is Len([Bank_Account])=8 but I have tried adding this to the query but again doesn't work.
First of all is this possible to do? will the query look at all the items in the columns? Or am I going to have to add code (something I have no idea about really).