By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,149 Members | 885 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,149 IT Pros & Developers. It's quick & easy.

Data required validation in form View

P: 28
Access 2003 - I have set all records in a table to required, trying to add new record in table view gives relevent errors, but does not do this in form view - i need to ensure that all fields have data in them, form doesnt add record but doesnt give errors - please help if u can
Nov 22 '06 #1
Share this Question
Share on Google+
3 Replies


100+
P: 1,646
Access 2003 - I have set all records in a table to required, trying to add new record in table view gives relevent errors, but does not do this in form view - i need to ensure that all fields have data in them, form doesnt add record but doesnt give errors - please help if u can
When you are using databound controls in Access you have to do a little bit of coding to check the values in your controls. While it is fairly convenient for a beginner to have Access populate a form and handle new and deleted records, there are limits to what you can control. I never use data bound controls and there is quite a steep learning curve to get to that place. Up to you if you want to learn it. It won't happen in a forum though. You are going to have to get a book and work through some examples.

Good luck
Nov 22 '06 #2

P: 28
When you are using databound controls in Access you have to do a little bit of coding to check the values in your controls. While it is fairly convenient for a beginner to have Access populate a form and handle new and deleted records, there are limits to what you can control. I never use data bound controls and there is quite a steep learning curve to get to that place. Up to you if you want to learn it. It won't happen in a forum though. You are going to have to get a book and work through some examples.

Good luck
Thanks for your feedback, whilst I am not an expert I do use the code builder section so I could use validation rules such as isnull, trim(field) = "" etc, is this what you mean, or do i unbound the controls and update/ add record to table on close.
Nov 22 '06 #3

NeoPa
Expert Mod 15k+
P: 31,494
Yes, IsNull() is a good one to use for this.
i think what Will's saying is that the Required property is handled automatically in Table layout, but a Form is something you 'superimpose' and is a higher level - not directly connected to the underlying table as a table grid is.
Nov 22 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.