Results 1 to 4 of 4
  1. #1
    Alaska1 is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Oct 2010
    Posts
    55

    Checkbox and value not null

    I have a check box for paid invoices and a field that has the dollar amount. If I put the dollar amount into the field, I want the checkbox to be checked off. Can I use the After Update? If so, Can I use the code similar to one I used for populating a field after a checkbox is checked?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Being too lazy to hunt for your other code, I'll say it would probably be similar. That said, what's the purpose of the checkbox. Testing the amount field for Null would give you the same result, with less effort.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Alaska1 is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Oct 2010
    Posts
    55
    Quote Originally Posted by pbaldy View Post
    Being too lazy to hunt for your other code, I'll say it would probably be similar. That said, what's the purpose of the checkbox. Testing the amount field for Null would give you the same result, with less effort.
    Here is the code:

    Private Sub Payroll_Error_AfterUpdate()
    If Me.PayrollErrorOccuredCheck Then
    Me.DataEntry1 = "Pay Error Occurred"
    Else
    Me.DataEntry1 = ""
    End If
    End Sub

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    As I said, it would be similar. Have you tried yet? You would check the dollar amount field (IsNull or > 0), and set the checkbox field. Have you considered not having the field? It's basically a calculated field, which we typically don't store.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Checkbox
    By Patience in forum Access
    Replies: 5
    Last Post: 06-22-2010, 05:37 AM
  2. Using a checkbox help
    By gbjc105 in forum Forms
    Replies: 1
    Last Post: 01-28-2010, 08:27 PM
  3. Checkbox
    By Rbtsmith in forum Access
    Replies: 2
    Last Post: 02-17-2009, 04:19 PM
  4. checkbox
    By Suresh in forum Forms
    Replies: 0
    Last Post: 12-19-2007, 01:30 AM
  5. access checkbox
    By nshack31 in forum Forms
    Replies: 1
    Last Post: 12-09-2005, 10:17 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