473,327 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

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
Oct 6 '08 #1
1 2470
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.ActiveControl.Name
frm(strFld).BackColor = 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.

Oct 6 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Larry Woods | last post by:
I have a site that works fine for days, then suddenly, I start getting ASP 0115 errors with an indication that session variables IN SEPARATE SESSIONS have disappeared! First, for background...
2
by: jeffgeorge | last post by:
Trying to add 3 colors to 6 combinations of text possibilities. If this makes sense, the possibilities are: A D (one color for the combo beginning with A) A E B D (One color for the combo...
2
by: rudy | last post by:
I am trying to highlight the output of a field to display something similar to conditional formating. Would prefer to display the result with a code instead of a colored font or colored background...
3
by: Tom | last post by:
Is there any way to use conditional formating to change a control for a field in a continuous form to a textbox, option group or combobox depending on the value of another field on the form? On a...
2
by: Rachel Suddeth | last post by:
Here is my scenario: I have a few custom controls that I set up on a form and tested setting properties and appearances. Then I added a couple references to the project which add classes I need to...
6
by: Martin Evans | last post by:
Sorry, yet another REGEX question. I've been struggling with trying to get a regular expression to do the following example in Python: Search and replace all instances of "sleeping" with "dead"....
3
by: Smiley | last post by:
Hi, I know how to do confitional formating in Excel by clicking the wizard. Is this possible in MS Access ? If so, please directly where to look. I found example but nothing as to how to do it....
4
by: slinky | last post by:
Thanks in advance... I have a continuous style form with a field for each record called "STATUS". I simply want to have the form load and if the value of the textbox is "Inactive" I want the...
0
by: =?Utf-8?B?Q2hhcmxlcw==?= | last post by:
Like many people, I normally use Yahoo! Mail via the web and like to keep all my emails stored on the Yahoo! server. However sometimes I can’t get access to a PC/the web and I download my emails...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.