Results 1 to 12 of 12

Thread: [RESOLVED] Access - Changing control property on one record but not all records

Hybrid View

  1. #1
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950

    Re: Access - Changing control property on one record but not all records

    I couldn't get it to work for a continuous view (not saying it can't be done, just that I didn't get it), but did get it for Single record view. Code like this in the Form_Current event:
    VB Code:
    1. Private Sub Form_Current()
    2.        If [txtFoo] = "B" Then
    3.             [txtFoo].BackColor = vbBlue
    4.       Else
    5.             [txtFoo].BackColor = vbWhite
    6.       End If
    7. End Sub
    You'd have to alter it some for a combobox, but that's the idea. If you have to have a continuous form, I don't know without more research.
    Tengo mas preguntas que contestas

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Posts
    131

    Re: Access - Changing control property on one record but not all records

    Thanks again for the post, I really appreciate you trying to help me. Using single form is an option, but I really need continuous view. I'll keep trying and let you know if i figure something out.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Posts
    131

    Re: Access - Changing control property on one record but not all records

    So I tried a version of your code, Salvelinus and it worked except that as soon as i clicked on a new record, the control's backcolor went back to the color it was before. I'm pretty sure that is because it was in the Form_Current event. Is there a way to save the properties of the control after they are changed in the Form_Current event procedure?

  4. #4
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950

    Re: Access - Changing control property on one record but not all records

    Ok, may have found what you want. Check here for conditional formatting.
    Tengo mas preguntas que contestas

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Posts
    131

    Re: Access - Changing control property on one record but not all records

    Perfect!! That was EXACTLY what I was looking for. Man, there is a wealth of info in that sample program. Thanks again for all your help, it has been much appreciated!

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Posts
    131

    Re: Access - Changing control property on one record but not all records

    I have a textbox that I use as the background for each of my records. Does anyone know how to completely disable the textbox control so that it can't be clicked and therefore in focus? I have the properties of the textbox set to .enabled = false and .locked = true, but I can still click on the textbox which then covers up all the other controls in the record. Anyone?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width