white text appearance when control is clicked

Working with Access 2003 and XP. I have a white form with a dark
colored header. I placed a transparent control (with the company name)
in the header and formatted the text to be white. It looks great, but
I want users to be able to click in the control to execute a search
function on the organization name. When you click in the control, you
get white text on a white background. Even after searching, the cursor
stays in the field and you can't see the company name.

Is there anyway to turn the background of the activated control to any
other color than white?

Thanks,
Ruth

0
Ruth
6/20/2007 5:24:35 PM
access.forms 6864 articles. 2 followers. Follow

2 Replies
621 Views

Similar Articles

[PageSpeed] 25

On Jun 20, 12:24 pm, Ruth <ruthh...@gmail.com> wrote:
> Working with Access 2003 and XP. I have a white form with a dark
> colored header. I placed a transparent control (with the company name)
> in the header and formatted the text to be white. It looks great, but
> I want users to be able to click in the control to execute a search
> function on the organization name. When you click in the control, you
> get white text on a white background. Even after searching, the cursor
> stays in the field and you can't see the company name.
>
> Is there anyway to turn the background of the activated control to any
> other color than white?
>
> Thanks,
> Ruth

Ruth,

The simple answer to your question is, "Yes".

You will need to use VBA code in two seperate events for each control
that you wish to change the back color.

Place the following line of code in the "Got Focus" event of your
control:

Me.txtBox1.BackColor = 16711680

This line would turn the back color of the active control to blue when
it receives the focus.

If you wanted to make the back color red, the number would be 255.
You can use any valid number you want.

Then place the following line of code in the "Lost Focus" event of the
same control:

Me.txtBox1.BackColor = 16777215

This line would cause the back color to be reset to the default back
color of an Access control.

If you already have a color devined as the back color for your
control, just go to the property dialog box and copy the number for
the color you have specified and replace the "16777215" that I have
used with the number for your control.

HTH

Mr B

0
Mr
6/20/2007 6:47:55 PM
On Jun 20, 1:47 pm, "Mr. B" <mrbp...@suddenlink.net> wrote:
> On Jun 20, 12:24 pm, Ruth <ruthh...@gmail.com> wrote:
>
> > Working with Access 2003 and XP. I have a white form with a dark
> > colored header. I placed a transparent control (with the company name)
> > in the header and formatted the text to be white. It looks great, but
> > I want users to be able to click in the control to execute a search
> > function on the organization name. When you click in the control, you
> > get white text on a white background. Even after searching, the cursor
> > stays in the field and you can't see the company name.
>
> > Is there anyway to turn the background of the activated control to any
> > other color than white?
>
> > Thanks,
> > Ruth
>
> Ruth,
>
> The simple answer to your question is, "Yes".
>
> You will need to use VBA code in two seperate events for each control
> that you wish to change the back color.
>
> Place the following line of code in the "Got Focus" event of your
> control:
>
> Me.txtBox1.BackColor = 16711680
>
> This line would turn the back color of the active control to blue when
> it receives the focus.
>
> If you wanted to make the back color red, the number would be 255.
> You can use any valid number you want.
>
> Then place the following line of code in the "Lost Focus" event of the
> same control:
>
> Me.txtBox1.BackColor = 16777215
>
> This line would cause the back color to be reset to the default back
> color of an Access control.
>
> If you already have a color devined as the back color for your
> control, just go to the property dialog box and copy the number for
> the color you have specified and replace the "16777215" that I have
> used with the number for your control.
>
> HTH
>
> Mr B

Mr. B, You ROCK! Thanks so much! Exactly what I wanted.

0
Ruth
6/20/2007 7:17:37 PM
Reply:

Similar Artilces:

I've never used a RichEdit control before and I am getting an assertion...
My application's ::InitInstance calls AfxInitRichEdit2() (which returns TRUE) The dialog I have placed the control on is created dynamically and in the wizard generated code: void CFileScanViewer::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); DDX_Control(pDX, IDC_RICHEDIT_RESULTS, m_oRichEditResults); } DDX_Control fails with an ASSERTION because all the way down in CDataExchange::PrepareCtrl the call to GetOleControlSite( control ID ) returns NULL. IDC_RICHEDIT_RESULTS is the ID of a RichEdit 2.0 control. m_oRichEditResults was created by using the dialog...

Text #3
In Cell A1,2 ,3 ect i have the following info 12345BO 1234BO 123456BO How do i convert these in Cells B1, 2, 3 etc to : 012345 001234 123456 To create a 6 figure number with the BO dropped off? in column b put this formula find(a1,"BO",1) in column c put this formula mid(a1,1,b1-1) format the c column to numbers "Dava Sutts" wrote: > In Cell A1,2 ,3 ect i have the following info > > 12345BO > 1234BO > 123456BO > > How do i convert these in Cells B1, 2, 3 etc to : > 012345 > 001234 > 123456 > > To create a 6 figure number with th...

Scrolling Text Field
I am not sure if this is the correct forum or not. I use FrontPage to manage my personal website and I am one step above a novice. On several of my pages I post rather lengthy clips of VBA code. I would like to display this code in some sort of fixed sized text field where visitors could scroll to read or select and copy the text. I have found on the Insert menu a Form>Insert Text Area control that almost suit the bill if I could only figure out how "lock" it so that the content cannot be altered by visitors. Can this be done or is there a more appropriate type...

Abstract User Control
I am writing a couple of text editors - one for RTF, the other for plain text. It seemed a good idea to make the base class (inherited from User Control) Abstract and then deriving the 2 editors from it each with slightly different properties. That way I can't create an instance of the base class, I have to choose from either a text editor or an RTF editor. Does that design strategy make sense? I have run into a couple of issues. VS throws up an error in design mode saying it needs to create an instance of the base class but can't because it is abstract. Should I ju...

Line Break in unbound text box with hyperlink
Hi. I have a text box that displays a generated hyperlink on a report. The problem is that sometimes the hyperlink is longer than the text box and it grows vertically and inserts a line break after the end of the first line. When the user clicks the link on the electronic PDF created from the report, it only picks up the first line of link. Is there a way to tell it to "wrap" to pick up the all the lines? Thanks, Cathy ...

copy value calendar control
This is a 2 part question: I have a calendar control attached to 3 cells (C6, E6, E7) designating travel dates on the same sheet so users can pick the desired date they wish to input. Question 1: Once the date is chosen (which is always in the future from today) why does it still show today's date when the cell is re-selected even though another date has already been chosen? Can it be set to default to the cell's already entered value? Question 2: Once a date is selected for C6, how can E6 be defaulted to the value of C6 so that date can be used as the starting poin...

Text Box Invisible
I have Word 2007 and have been using it for over a year. Recently, text boxes and drawings are invisible in all but Print Preview and Full Screen Reading mode. They used to be visible in other modes until the following sequence of events occurred: 1) I sent a Word 2007 document out for review. 2) The reviewer returned the document in compatibility mode with Track Changes on. 3) I accepted all changes. It appears my preferences and styles were changed. I looked for a way to show/hide text boxes and drawings, but couldn't find anything. On Tue, 17 Nov 2009 12:14:09 -08...

Most Frequently used Text value in a column
I have an Excel 2000 spreadsheet used for daily entries for any given month. Some of the columns have text values instead of numeric. It is possible that the text entries would be the same for every day or they could vary between 2 or 3 different text values. I would like to know if there is a formula that would retrieve the most frequently entered TEXT. Ex: Jan 01 cat Jan 02 dog Jan 03 cat Jan 04 dog Jan 05 dog Jan 06 dog Jan 07 cat Jan 08 dog Jan 09 bird Jan 10 cat ============= Max dog ...

Distribution Lists Do Not Appear
Hi: We are currently running Windows 2003 SBS. Our Exchange works fine I can create/delete/edit users, get/send mail, etc. However, if I create a distribution list and add the members it will not show up in the global contact list. I have tried re-patching Exchange with SP 1 and have tried a hot fix on the MS site but still I cannot get any distribution lists to appear. Any help would be greatly appreciated. Thanks. Bolow do you see the members in ADUC? if you do, but do not see them in the GAL, there may be something wrong with your RUS... "bolow" <bolow@...

programmatically initialize properties of dialog controls
VC++6.0 I have created several dialogs in Resources. My dialogs have Static Texts, Edit Boxes, Buttons. Controls have IDs, some have member variables. After searching the web it is still a mystery to me how to initialize the properties of those controls in the code? I would like in OnInitDialog() set for the controls of the dialog: font size, format (for example, real number, date), acceptable string length, set tab stops in right order. And one more thing: I need to be able not only to write a text to an Edit Box programmatically but also to add (concatenate) some text to the existing Edit ...

easy control data value question
I have a report which has on it a text box when I enter the data value for the control as ProjectName it works fine when I enter the data value for the control as CurrentIssueTitle it works fine (both are in the report's data source) however, when I enter: = [ProjectName] & chr(13) & chr(10) & [CurrentIssueTitle] the result is an #error# even if I simply enter: = [ProjectName] & [CurrentIssueTitle] the result is an #error# it's still an error any suggestions would be greatly appreciated in advance, Mark ....learning something new every day ...

Copy Value Into A Control Based On A Criteria ANSWER
Hi All, I worked it out by myself after trail and error using DLookup in a independent control (named it getrate) and then using the setvalue as a macro copied the getrate value into the DAILY CHARGE control. This is the DLookup as I woked it out =DLookUp("[PRICE]";"PRICELIST";"[COMPANY]=[RESPEL]![COMPANY]AND[RESPEL]![TYPECHARGE]=[CHARGE]AND[RESPEL]![PRICELIST]=[CATEGORY]AND[RESPEL]![ARRIVAL]>=[START]AND[RESPEL]![ARRIVAL]<=[END]") Hope it helps someone else Bye Ange ...

How do I get the right click function back(on my mouse)?
I try to right click on my mouse when I need to edit a cell but nothing happened. Can anyone tells me how to get that function back. I have been use this function forever but just lost it two days ago. Right-click on a cell should bring a menu, not put you into Edit Mode. What do you mean by "Edit a cell"? Where are you right-clicking? Did you mean to say "double-click" on a cell does not put you into Edit Mode? Maybe you unchecked "Edit directly in cell" in Excel Options? Gord Dibben MS Excel MVP On Wed, 3 Mar 2010 12:02:04 -0800, ...

Displaced text MS Publisher2002
When overlapping one text box with another -in 2003- the text in one of them is displaced. Moving one or the other to the back appears to have no effect. Ctrl T, which works when placing text over a picture, doesn't however work with text over text. I'm almost certain that this operation could be carried out in earlier versions of MS Publisher Where am I going wrong? After managing to set up OE-QuoteFix on his new PC, Ed reads a message from Serendipity <pill@blueyonder.co.uk>... > When overlapping one text box with another -in 2003- > the text in one of them is disp...

Activating cursor in a text box
Hi, I have a problem that for sure is just a simple trap I got into. I need to relocate cursor to the first record (actually any record) in a subform and activate it (so it is blinking) to enable PageDown. I use of course SetFocus, I even select some text in the field like in the example below Me.NameAndFirstName.SetFocus Me.NameAndFirstName.SelStart = 0 Me.NameAndFirstName.SelLength = 5 /of course simple set focus is not working as well/ /I checked with fields enabled, disabled, locked and unlocked/ The problem is that the cursor is not blinking, so when I hit PageDown button, Access g...

How do I copy and paste an Illustratorsketch with text into Excel
Any input from you would be great ...

outlook 2003 stops responding (hang) when you click reply to all
i have received a mail, when i click to reply to all outlook 2003 hang/stops responding regards richard ...

Control of Windows 7 Start menu
In XP I could use Classic menus and put the programs I wanted into my start menu and launch them by pressing the Start Key and then the first letter of the program. If I do that now, it seems to do a search of my HD for items with that letter in it. Can someone tell me how to get this function in Win 7. Thanks. On Tue, 23 Feb 2010 19:14:38 -0600, Bob S wrote: >In XP I could use Classic menus and put the programs I wanted into my start >menu and launch them by pressing the Start Key and then the first letter of >the program. If I do that now, it seems to do a sea...

Report Must be Clicked to Enlarged
I developed an application which runs several reports. When a report opened it remained minimized so I put a command in the open event of each report: DoCmd.Maximize This solved one problem, however, the report still does not fill the entire screen until the report is clicked after it is displayed. Is there a way to do this programatically so that when a report is opened, it not only maximizes, but fills the entire screen without the user having to click on it ? On Sat, 12 May 2007 08:38:00 -0700, rmcompute wrote: > I developed an application which runs several reports. When ...

Digits in text cannot format as Numbers ?
Hi, I receive a weekly report from our IT and the digits (in general format and align to the left though ) cannot be changed to ordinary numbers so that I can sort them in A-Z. When I highlight the whole digit column and format it to Numbers,nothing change. I am running Office 2000 and OS XP Pro. I once saw the latest Office 2003 having a feature to convert such digits to Numbers without any problem. Anyone has a solution or workaround ? Thanks Regards ST -- st24961 ------------------------------------------------------------------------ st24961's Profile: http://www.excelforum.com/m...

Multiselection mode of CListBox control
I have VC 6.0 MFC application. One of its dialogs has multiselection listbox control. I need to allow user make multiple selection ONLY when CTRL or Shift keys are pressed. In other cases user should not be allowed to make multiple selections. I wonder whether I should derive my own class from CListBox and implement this functionality by myself? Or I can achieve the same by just properly configuring the CListBox control? Could you advise? Thanks ...

Missing ActiveX Control
Hi, I have a ADO application which has a main dialog box. The application was originally developed and built using Visual Studio 6.0. I inherited the code base. I'm using Visual Studio.Net version 7.0. When I view the .rc2 file in the solution explorer and double click on the IDD_XXX_Dialog I get the error message .. " The ActiveX control XXXX-XXXX-XXXX-XXXX is not registered on this machine. Register this control and try again" Please help what is going on and how can I build this app in VC 7.0 successfully TIA for all your help regards Bikram "Bikram Suri" <...

Problems with Tab Control Display Area
I seem to be having a lot of trouble with figuring out the display area of a tab control. I have a class called CDialogTabCtrl that is derived from MFC's CTabCtrl. When the window is resized, I want to resize each of the child dialog box windows that are made visible individually as each tab is selected. Below is my code. m_arPanels is a CArray of CWnd pointers. The problem with this routine is that it appears to work perfectly. :-) However, I don't think that it should. The routine converts the window coordinates of the tab control to client coordinates of the parent control. But th...

Multiple ActiveX Controls
We have an ActiveX control that is built in VC++ and being used in VB and VC++. We are trying to use it in applications where there will be multiple instances of the control. When we attempt to use the control in this way, some, not all, of the events are passed to the wrong control. Ex: If there are three instances placed on a form and the third instance fires an event, the interface for the first control in the form will be the one that receives the event. When we've examined this closely, we have found that the handle of the control is being lost. Has anyone else seen anythin...

How do I: enter a checkmark symbol in a cell by clicking on it
This is what I am trying to do.... 1. When someone clicks on cell, the checkmark symbol is entered into the cell 2. When someone clicks on the same cell again, they cell becomes blank (ie toggle between checkmark and blank) 3. Then how do I count the number of checkmarks in a column. Thanks, -- prsII ------------------------------------------------------------------------ prsII's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=32166 View this thread: http://www.excelforum.com/showthread.php?threadid=519157 How about a double-click?: Enter the following in ...