Results 1 to 4 of 4
  1. #1
    accessn00bie is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    2

    Exclamation Data entry validation rule in Form

    Hello,

    I apologize if this is not in the correct section. I wasn't too sure where to post it.

    What I have:
    Table named: clients table
    Form named: clients data form

    What I'm trying to accomplish:


    The form has the client information. The client sends me a document. I review the document. If the document has the correct info needed, then I have a field named "Incomplete" that is a Yes/No field in the clients table.

    If the field is clicked, then I want the next date field to appear and then I can fill in the date that it was sent back to them.

    If the field "incomplete" field is not checked, then I don't want that date field to appear nor do I want to fill it out.

    I have searched many threads on the forum and I can't seem to figure it out still.
    After reading around, I think could will be the best option but I'm not that good with access and havne't been able to solve it.

    I have attached a screen shot to give you an idea of what I mean.

    Any help is greatly appreciated!
    Attached Thumbnails Attached Thumbnails incomplete.jpg  

  2. #2
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    In the On Current Event for the form, set the enabled status of the date fields to false if the check boxes are not checked. In the after update event for each of the check boxes, set the enabled status to true if the check box is set to true.

    Alan

  3. #3
    accessn00bie is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    2
    Thanks for the quick response!

    I'm not too familiar with those options. I hate to ask but could you point me in the right direction?
    I have the form open in design view. I clicked on the "sent back" white box aka "Text87" and I have the property sheet open.

    Under the Event tab, I see "After update" but I don't see "On current event"

    Am I in the wrong area? Also, your instructions, am I to write that into code or once I find the "On current event"?
    Thanks again


    -----
    edit:
    I found the "on current" event for the Form itself.
    Which option do I pick?
    Pick code builder? I have an idea of what I need to code but not too positive.


    Code:
    Private Sub Text87_AfterUpdate()
    If Attempted = "Yes" Then
    Text87.Visible = True
    Else
    Text87.Visible = False
    End If
    End Sub

  4. #4
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    Looks like you are on the right track. One question. In your table for the check boxes are they set to Yes/No or True/False. Just be consistent in your code. Also, do you want the date controls visible or enabled. Enabled = False they means it will be visible but greyed out. This is just a design preference.

    Post back with any questions you have.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 10-25-2012, 02:39 PM
  2. Form Validation Rule
    By galkej in forum Forms
    Replies: 4
    Last Post: 07-01-2012, 06:38 PM
  3. Replies: 1
    Last Post: 03-28-2012, 10:01 AM
  4. Validation Rule in Table vs. Form
    By LanieB in forum Forms
    Replies: 2
    Last Post: 03-12-2012, 03:27 PM
  5. Referencing table data in field validation rule
    By toad848 in forum Database Design
    Replies: 3
    Last Post: 03-19-2009, 07:03 AM

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