Conditional Formating Disappearing Act

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Earl Anderson

    Conditional Formating Disappearing Act

    A business colleague and I are collaborating 'long distance' on an applet
    for work. He is doing the programming and I am doing the business process
    form design. We had discussed my desire to make all of the textbox fields
    with the 'focus' become a 'light orange' in backcolor. He is working in
    A2k3/WinXP and I am working in A2002/WinXP (The users of the applet have
    A2k3). In our preliminary discussions about this particular enhancement, he
    formatted one of the forms ([frm_TestForm]) as a 'test' to understand
    exactly what I wanted. In an effort to 'share the load', we decided that I
    would do the conditional formatting to achieve the 'light orange' backcolor
    in all of the forms of the applet.

    After he placed the "Applet.mdw ", "Applet_Backend .mdb", "Applet.mdb " and the
    "Applet Icon" shortcut file in a network folder for me to work with, I
    copied those files (thru VPN) to my a folder on my "C:\Program Files". I
    then went thru each form in 'Design View' and conditionally formatted each
    textbox to the desired backcolor, saving each before moving on to the next
    form. I did notice that his [frm_TestForm] was already formatted from when
    he did it previously. After 2 hours (off & on) in completing this mundane
    formatting task, I then copied the same 4 files from my "Program Files" and
    pasted them back into a separate/different folder on the network (thru VPN)
    so that he could retrieve them and continue on with his work with the newly
    formatted forms in the applet. (I sent them to a separate/different folder
    on the network so that these files would not be confused with the same ones
    I copied initially from the network.)

    To our mutual astonishment and frustration, none, absolutely none of the
    forms that I had formatted (that's all but [frm_TestForm]) had retained the
    'light orange' backcolor formatting when he opened them. However, the
    [frm_TestForm] he had formatted originally was still formatted in 'light
    orange'.

    I apologize for the long explanation, but I wanted to present all of the
    facts and factors involved, before I ask the question--Does anyone know and
    can explain why my conditional formatting disappeared from the 'pasted'
    files (actually, it should have been only the "Applet.mdb " that was at
    issue)? The only thing I can fathom is that we were working in different
    versions of Access. I really do not want to buy A2k3 to test that theory.

    Thanks for listening (reading) and bearing with me...
    Earl


  • Salad

    #2
    Re: Conditional Formating Disappearing Act

    Earl Anderson wrote:
    A business colleague and I are collaborating 'long distance' on an applet
    for work. He is doing the programming and I am doing the business process
    form design. We had discussed my desire to make all of the textbox fields
    with the 'focus' become a 'light orange' in backcolor. He is working in
    A2k3/WinXP and I am working in A2002/WinXP (The users of the applet have
    A2k3). In our preliminary discussions about this particular enhancement, he
    formatted one of the forms ([frm_TestForm]) as a 'test' to understand
    exactly what I wanted. In an effort to 'share the load', we decided that I
    would do the conditional formatting to achieve the 'light orange' backcolor
    in all of the forms of the applet.
    >
    After he placed the "Applet.mdw ", "Applet_Backend .mdb", "Applet.mdb " and the
    "Applet Icon" shortcut file in a network folder for me to work with, I
    copied those files (thru VPN) to my a folder on my "C:\Program Files". I
    then went thru each form in 'Design View' and conditionally formatted each
    textbox to the desired backcolor, saving each before moving on to the next
    form. I did notice that his [frm_TestForm] was already formatted from when
    he did it previously. After 2 hours (off & on) in completing this mundane
    formatting task, I then copied the same 4 files from my "Program Files" and
    pasted them back into a separate/different folder on the network (thru VPN)
    so that he could retrieve them and continue on with his work with the newly
    formatted forms in the applet. (I sent them to a separate/different folder
    on the network so that these files would not be confused with the same ones
    I copied initially from the network.)
    >
    To our mutual astonishment and frustration, none, absolutely none of the
    forms that I had formatted (that's all but [frm_TestForm]) had retained the
    'light orange' backcolor formatting when he opened them. However, the
    [frm_TestForm] he had formatted originally was still formatted in 'light
    orange'.
    >
    I apologize for the long explanation, but I wanted to present all of the
    facts and factors involved, before I ask the question--Does anyone know and
    can explain why my conditional formatting disappeared from the 'pasted'
    files (actually, it should have been only the "Applet.mdb " that was at
    issue)? The only thing I can fathom is that we were working in different
    versions of Access. I really do not want to buy A2k3 to test that theory.
    >
    Thanks for listening (reading) and bearing with me...
    Earl
    >
    >
    The question is...do the files on your system have the changes? If they
    do, did you copy the correct files back to his system?

    Here's a quick and dirty method to do if you need to redo your efforts.
    I created a module with the following code.

    Public Function SetTheColor(frm As Form, strOnOff As String) As Boolean
    'set the background when you get focus to black,
    'white when you lose focus
    Dim strFld As String
    strFld = frm.ActiveContr ol.Name
    frm(strFld).Bac kColor = IIf(strOnOff = "On", 0, 16777215)
    SetTheColor = True
    End Function

    I create a form called Form1 and dropped in 4 text boxes. I then
    highlighted/selected all 4 text boxes and entered into the GotFocus event
    =SetTheColor([Forms]![Form1],"ON")
    and
    =SetTheColor([Forms]![Form1],"OFF")
    into the LostFocus event.

    I wanted to pass Me as the from argument but I couldn't get that to
    work. Anyway, if you changed Form1 to whatever the name of the form is
    to the name of your form you have in design mode you could do it over
    pretty quick.

    Then save your form then reopen it and verify the code stuck. I would
    also verify you don't have any got/lost focus events in the form prior
    to doing this.



    Comment

    Working...