Page 1 of 6 123456 LastLast
Results 1 to 15 of 87
  1. #1
    JFo is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    393

    Point me in the direction of a good resource for learning vb validation


    I know how to do all validation and setting default values within a table in access. However due to the nature of the current database I am designing this now all needs to be achieved at a form level.

    For example I will need to display a default values for a number of different records that are actually the same field on one specific form. Furthermore I want to be able to only allow certain values to be input into specific records in same field as well.

    Therefore can anyone point me in the direction of a good resource to do this in vb at form level or if they have any examples of this I would be great?

    Thanks

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    are you aware that table-level validation that is set also transfers to form entries with bound fields? you can also set this at the form level via the prop sheets.

  3. #3
    JFo is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    393
    yes I am aware if I understand you correctly however I want to use the same field with different types of validation for each record so it needs to be done from a form level.

    Thanks

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    different validation for the SAME field, having it change record by record is not normal. I won't support such a thing. sorry. good luck to ya.

  5. #5
    JFo is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    393
    Thanks for your feedback, I have actually been on this forum for well over a month simply attempting to discover the best way to design my database and this was the way I was encouraged to design it. Please let me know which way you would design my system as the validation is extremely important. I have multiple forum topics that you can find in my account listing however here is one of the main ones that I have started to try and figure out best way to design my system

    https://www.accessforums.net/access/...ase-16943.html

    Cheers

  6. #6
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    Why do you need to Validate when the user can only choose from a prepopulated list.

    You can't mix Numbers, and Date with Text when the field if formated to Text.

  7. #7
    JFo is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    393
    I don't understand what you are talking about the user will be entering there own comment which is different for each question, different for each piece of equipment, different for each check-list.

    There is no pre-populated list. It is impossible to know what would be recorded for each question

    This is why I originally had a different table for each check-list

    I thought this was why we chose this design?

    Cheers

  8. #8
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    There is no pre-populated list. It is impossible to know what would be recorded for each question

    If this is true then what is tblCheckListAnswers used for.

  9. #9
    JFo is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    393
    That is what I have been wondering the whole time. For every question there must be a comment and a yes, no or n/a answer. Every comment/ answer is different.

    You asked me to give you an example of a number of questions and that is what I have done. Every question from tblchecklist matches up with an (possible) answer in tblChecklistAnswer.

    however this is only one possible answer per question not a list of possible answers for each question.

  10. #10
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    If there is only one possible answer then why ask the question in the first place as you already know the answer.


  11. #11
    JFo is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    393
    there is infinite answers for each question, it is a comment whatever the inspector wants to write

  12. #12
    JFo is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    393
    however some questions must be dates, times, serial numbers etc so need validation for these ones and all should default to a value to make data entry quicker as well

  13. #13
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    I am struggling to understand.

    Please supply a sample Question followed by the FULL answer.

    Also if you have many questions how do you expect to have a different default answer for each.

  14. #14
    JFo is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    393
    As per the database that I poulated 1 question is

    Local Isolator Identification present

    The answer(s) are

    ID present, shielded

    and

    yes

    That is the same for every different question in tbChecklist and the corresponding answers in tblChecklistAnswer

    Another question is

    Registration Number posted on beam

    and the answers are

    Posted in top left

    and yes

    As you can see from all those questions and answers it is basically anything that can be an answer as well as yes, no, or N/A

    thanks

    1 more the question is

    SWL sign posted on beam

    and the answers are

    Not Sighted

    and

    No

  15. #15
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    It appears that you need more than one field in your Table for results.

    A Text Field, A Yes/No Field, a Number Field and a Date field. (These are examples and may not reflect exactly what you need)

    Suggest that you don't use an Input Mask on the Date field. Just Format it the way you want it.

    FYI. Access does not store dates. It stores Numbers. So no matter what it looks like it is still a Number. But you Must use the Date Type for your Field.

Page 1 of 6 123456 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Excess Resource (MSDB)
    By mei909 in forum Programming
    Replies: 1
    Last Post: 09-04-2011, 12:15 AM
  2. Need Direction
    By sabrish72 in forum Programming
    Replies: 5
    Last Post: 06-08-2011, 09:25 PM
  3. Some general direction
    By Darkglasses in forum Database Design
    Replies: 4
    Last Post: 02-20-2011, 02:38 PM
  4. Need Direction Parts Form
    By Deano in forum Forms
    Replies: 2
    Last Post: 01-22-2011, 06:01 AM
  5. Direction needed.....
    By EVS Director in forum Database Design
    Replies: 7
    Last Post: 06-22-2010, 05:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums