Results 1 to 4 of 4
  1. #1
    NikoTheBowHunter is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2017
    Posts
    58

    On Load Help

    I just created a checkbox on my form, that when clicked changes the background color of a text box. The problem I am running into is when I change the record, the form doesn't look to see if the box is checked or not to change the color of the text box. So if viewing record #1, click the check box, changes text box to red. click to view record #2 that doesn't have the check box checked, text is still red. If I was to load Record #2 first, when going into Record #1 it would still be gray.

    So what would I need to change/address to resolve this issue? Would it be something to the effects of an On Load for something or would there be an easier route to go? Thus the reason I turn to you good peeps.

    Here is the code I use for the changing the text box.



    text box = [Notes History]
    check box = DEFECTIVE

    Code:
    Private Sub DEFECTIVE_Click()
    If Me.DEFECTIVE = True Then
    [Notes History].BackColor = 255
    Else
    [Notes History].BackColor = 12566463
    End If
    End Sub

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Try your code in the forms On Current event
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    NikoTheBowHunter is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2017
    Posts
    58
    Thank you so much Bob!!! Solved my issue!!!!

  4. #4
    NikoTheBowHunter is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2017
    Posts
    58
    Disregard, figured it out.

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

Similar Threads

  1. Image Load
    By RayMilhon in forum Forms
    Replies: 2
    Last Post: 12-03-2014, 06:30 PM
  2. filter load
    By slimjen in forum Forms
    Replies: 11
    Last Post: 08-06-2014, 10:25 AM
  3. Replies: 12
    Last Post: 03-27-2014, 04:49 AM
  4. load and next buttons
    By landog in forum Forms
    Replies: 2
    Last Post: 10-07-2012, 01:01 PM
  5. Northwind - how to load
    By KHill in forum Access
    Replies: 4
    Last Post: 07-10-2012, 07:37 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