Condition navigating between Controls

I have a form in access 2007, with several controls. I used the On Exit Event 
Procedure for navigating among controls.
Example:
If Method of Payment = “Check” Then
Check No.Set Focus
End If
If Method of Payment = “Credit Card” Then
Credit Card Name.Set Focus
End If
End Sub
And so on for all controls. Form functioned well for months, however today 
went wild. Navigation order does not execute Event Procedure it follows 
exactly the order of TAB ORDER DIALOG BOX.
Please advice
-- 
Bardia
0
Utf
5/13/2010 6:39:01 PM
access 16762 articles. 3 followers. Follow

11 Replies
1110 Views

Similar Articles

[PageSpeed] 36

It sounds like the On Exit event is not firing for some reason. Put these 
two lines of code at the beginning of your On Exit event to test:

MsgBox "On Exit Event Just Fired"
Exit Sub

If you get the message, something else is happening.

Steve
santus@penn.com


"Bardia" <Bardia@discussions.microsoft.com> wrote in message 
news:14F2E84F-B613-45DC-BBD7-8608B134204B@microsoft.com...
>I have a form in access 2007, with several controls. I used the On Exit 
>Event
> Procedure for navigating among controls.
> Example:
> If Method of Payment = "Check" Then
> Check No.Set Focus
> End If
> If Method of Payment = "Credit Card" Then
> Credit Card Name.Set Focus
> End If
> End Sub
> And so on for all controls. Form functioned well for months, however today
> went wild. Navigation order does not execute Event Procedure it follows
> exactly the order of TAB ORDER DIALOG BOX.
> Please advice
> -- 
> Bardia 


0
Steve
5/13/2010 7:12:26 PM
"Bardia" <Bardia@discussions.microsoft.com> wrote in message 
news:14F2E84F-B613-45DC-BBD7-8608B134204B@microsoft.com...
>I have a form in access 2007, with several controls. I used the On Exit 
>Event
> Procedure for navigating among controls.
> Example:
> If Method of Payment = “Check” Then
> Check No.Set Focus
> End If
> If Method of Payment = “Credit Card” Then
> Credit Card Name.Set Focus
> End If
> End Sub
> And so on for all controls. Form functioned well for months, however today
> went wild. Navigation order does not execute Event Procedure it follows
> exactly the order of TAB ORDER DIALOG BOX.
> Please advice


Did you by any chance move the database from a trusted location to an 
untrusted one?  If it looks lie the VBA code is just not executing, the 
database may have become untrusted, and Access 2007 won't execute code in an 
untrusted database.

-- 
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)

0
Dirk
5/13/2010 7:23:08 PM
"Bardia" <Bardia@discussions.microsoft.com> wrote in message 
news:14F2E84F-B613-45DC-BBD7-8608B134204B@microsoft.com...
>I have a form in access 2007, with several controls. I used the On Exit 
>Event
> Procedure for navigating among controls.
> Example:
> If Method of Payment = “Check” Then
> Check No.Set Focus
> End If
> If Method of Payment = “Credit Card” Then
> Credit Card Name.Set Focus
> End If
> End Sub
> And so on for all controls. Form functioned well for months, however today
> went wild. Navigation order does not execute Event Procedure it follows
> exactly the order of TAB ORDER DIALOG BOX.
> Please advice
> -- 
> Bardia 

0
Ruben
5/13/2010 7:58:28 PM
Bardia

As I recall, the OnExit event doesn't fire if you click out.

I'm thinking you'll want to try the AfterUpdate event instead.

And if your control name is, literally, "Method of Payment", then you'll 
have to lend Access a hand so it knows what you're talking about.  You'd 
need to delimit that control name with square brackets (e.g., [Method of 
Payment]) because it has embedded spaces.

Good Luck!

Regards

Jeff Boyce
Microsoft Access MVP

-- 
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"Bardia" <Bardia@discussions.microsoft.com> wrote in message 
news:14F2E84F-B613-45DC-BBD7-8608B134204B@microsoft.com...
>I have a form in access 2007, with several controls. I used the On Exit 
>Event
> Procedure for navigating among controls.
> Example:
> If Method of Payment = "Check" Then
> Check No.Set Focus
> End If
> If Method of Payment = "Credit Card" Then
> Credit Card Name.Set Focus
> End If
> End Sub
> And so on for all controls. Form functioned well for months, however today
> went wild. Navigation order does not execute Event Procedure it follows
> exactly the order of TAB ORDER DIALOG BOX.
> Please advice
> -- 
> Bardia 


0
Jeff
5/13/2010 8:15:36 PM
On Thu, 13 May 2010 11:39:01 -0700, Bardia <Bardia@discussions.microsoft.com>
wrote:

>I have a form in access 2007, with several controls. I used the On Exit Event 
>Procedure for navigating among controls.
>Example:
>If Method of Payment = �Check� Then
>Check No.Set Focus
>End If
>If Method of Payment = �Credit Card� Then
>Credit Card Name.Set Focus
>End If
>End Sub
>And so on for all controls. Form functioned well for months, however today 
>went wild. Navigation order does not execute Event Procedure it follows 
>exactly the order of TAB ORDER DIALOG BOX.
>Please advice

In addition to Steve and Dirk's concerns, one problem is that you have blanks
in your control names. Blanks are meaningful in VBA - the line

If Method of Payment = ...

is meaningless to Access, because it sees "Method" as one term, "of" as a
different unrelated term, "Payment" as yet a third. A human can see that it's
all one thing but the poor computer is pretty stupid and literal minded!

Best choice: don't put blanks in the names of things; if the textbox or field
is named MethodOfPayment or Method_Of_Payment you won't have the problem. Note
that SetFocus is one word, not two.

Alternatively, enclose your field/control names in square brackets. I'd also
suggest using the AfterUpdate event (which fires when the user has made a
change) rather than the Exit event (which fires if they just set focus to the
control and leave without doing anything), and use the Me! keyword to refer to
the current form:

If Me![Method of Payment] = �Check� Then
   Me![Check No].SetFocus
ElseIf Me!Method of Payment] = �Credit Card� Then
   Me![Credit Card Name].SetFocus
End If
End Sub

-- 

             John W. Vinson [MVP]
0
John
5/13/2010 8:27:14 PM
Thanks, yes I copied the database file from one computer to another using 
ScanDisk. But on second computer the same Access 2007 is installed. In any 
case if your guess is correct how should I solve this problem?
-- 
Bardia


"Dirk Goldgar" wrote:

> "Bardia" <Bardia@discussions.microsoft.com> wrote in message 
> news:14F2E84F-B613-45DC-BBD7-8608B134204B@microsoft.com...
> >I have a form in access 2007, with several controls. I used the On Exit 
> >Event
> > Procedure for navigating among controls.
> > Example:
> > If Method of Payment = “Check” Then
> > Check No.Set Focus
> > End If
> > If Method of Payment = “Credit Card” Then
> > Credit Card Name.Set Focus
> > End If
> > End Sub
> > And so on for all controls. Form functioned well for months, however today
> > went wild. Navigation order does not execute Event Procedure it follows
> > exactly the order of TAB ORDER DIALOG BOX.
> > Please advice
> 
> 
> Did you by any chance move the database from a trusted location to an 
> untrusted one?  If it looks lie the VBA code is just not executing, the 
> database may have become untrusted, and Access 2007 won't execute code in an 
> untrusted database.
> 
> -- 
> Dirk Goldgar, MS Access MVP
> Access tips: www.datagnostics.com/tips.html
> 
> (please reply to the newsgroup)
> 
0
Utf
5/14/2010 6:12:08 PM
"Bardia" <Bardia@discussions.microsoft.com> wrote in message 
news:1033A0C1-098A-49F1-821B-44204CED34C7@microsoft.com...
> Thanks, yes I copied the database file from one computer to another using
> ScanDisk. But on second computer the same Access 2007 is installed. In any
> case if your guess is correct how should I solve this problem?

First, in Windows explorer, right-click the database file and choose 
Properties from the popup menu.  It may be that the file has been blocked, 
as having come from another computer.  If so, there will be an Unblock 
button displayed on the property sheet.  If you see that button, click it to 
unblock the file.

If that isn't enough to fix the problem all by itself, then follow the 
instructions in this article to designate the folder containing your 
database as a trusted location:

    http://office.microsoft.com/en-us/help/HA100319991033.aspx
    Create, remove, or change a trusted location for your files

-- 
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)

0
Dirk
5/14/2010 6:53:15 PM
Thank you,
Original control names are without any spaces and some are on After update . 
I am really puzzled. This is a very small database and been working well 
since April 2009. Another surprise is that the size of its file was  11,700 
KB, now is only 2,816 KB,  but when I check the total number of records they 
are all there!
I even checked the database options to make sure that the box of Always use 
event procedures is checked. 

-- 
Bardia


"John W. Vinson" wrote:

> On Thu, 13 May 2010 11:39:01 -0700, Bardia <Bardia@discussions.microsoft.com>
> wrote:
> 
> >I have a form in access 2007, with several controls. I used the On Exit Event 
> >Procedure for navigating among controls.
> >Example:
> >If Method of Payment = “Check” Then
> >Check No.Set Focus
> >End If
> >If Method of Payment = “Credit Card” Then
> >Credit Card Name.Set Focus
> >End If
> >End Sub
> >And so on for all controls. Form functioned well for months, however today 
> >went wild. Navigation order does not execute Event Procedure it follows 
> >exactly the order of TAB ORDER DIALOG BOX.
> >Please advice
> 
> In addition to Steve and Dirk's concerns, one problem is that you have blanks
> in your control names. Blanks are meaningful in VBA - the line
> 
> If Method of Payment = ...
> 
> is meaningless to Access, because it sees "Method" as one term, "of" as a
> different unrelated term, "Payment" as yet a third. A human can see that it's
> all one thing but the poor computer is pretty stupid and literal minded!
> 
> Best choice: don't put blanks in the names of things; if the textbox or field
> is named MethodOfPayment or Method_Of_Payment you won't have the problem. Note
> that SetFocus is one word, not two.
> 
> Alternatively, enclose your field/control names in square brackets. I'd also
> suggest using the AfterUpdate event (which fires when the user has made a
> change) rather than the Exit event (which fires if they just set focus to the
> control and leave without doing anything), and use the Me! keyword to refer to
> the current form:
> 
> If Me![Method of Payment] = “Check” Then
>    Me![Check No].SetFocus
> ElseIf Me!Method of Payment] = “Credit Card” Then
>    Me![Credit Card Name].SetFocus
> End If
> End Sub
> 
> -- 
> 
>              John W. Vinson [MVP]
> .
> 
0
Utf
5/14/2010 10:19:01 PM
Thank you,
Original control names are without any spaces and some are on After update . 
I am really puzzled. This is a very small database and been working well 
since April 2009. Another surprise is that the size of its file was  11,700 
KB, now is only 2,816 KB,  but when I check the total number of records they 
are all there!
I even checked the database options to make sure that the box of Always use 
event procedures is checked. 

-- 
Bardia


"Jeff Boyce" wrote:

> Bardia
> 
> As I recall, the OnExit event doesn't fire if you click out.
> 
> I'm thinking you'll want to try the AfterUpdate event instead.
> 
> And if your control name is, literally, "Method of Payment", then you'll 
> have to lend Access a hand so it knows what you're talking about.  You'd 
> need to delimit that control name with square brackets (e.g., [Method of 
> Payment]) because it has embedded spaces.
> 
> Good Luck!
> 
> Regards
> 
> Jeff Boyce
> Microsoft Access MVP
> 
> -- 
> Disclaimer: This author may have received products and services mentioned
> in this post. Mention and/or description of a product or service herein
> does not constitute endorsement thereof.
> 
> Any code or pseudocode included in this post is offered "as is", with no
> guarantee as to suitability.
> 
> You can thank the FTC of the USA for making this disclaimer
> possible/necessary.
> 
> "Bardia" <Bardia@discussions.microsoft.com> wrote in message 
> news:14F2E84F-B613-45DC-BBD7-8608B134204B@microsoft.com...
> >I have a form in access 2007, with several controls. I used the On Exit 
> >Event
> > Procedure for navigating among controls.
> > Example:
> > If Method of Payment = "Check" Then
> > Check No.Set Focus
> > End If
> > If Method of Payment = "Credit Card" Then
> > Credit Card Name.Set Focus
> > End If
> > End Sub
> > And so on for all controls. Form functioned well for months, however today
> > went wild. Navigation order does not execute Event Procedure it follows
> > exactly the order of TAB ORDER DIALOG BOX.
> > Please advice
> > -- 
> > Bardia 
> 
> 
> .
> 
0
Utf
5/14/2010 10:20:01 PM
On Fri, 14 May 2010 15:19:01 -0700, Bardia <Bardia@discussions.microsoft.com>
wrote:

>Thank you,
>Original control names are without any spaces and some are on After update . 
>I am really puzzled. This is a very small database and been working well 
>since April 2009. Another surprise is that the size of its file was  11,700 
>KB, now is only 2,816 KB,  but when I check the total number of records they 
>are all there!
>I even checked the database options to make sure that the box of Always use 
>event procedures is checked. 
>


Hope you have a backup. :-{(

It certainly sounds as if something is corrupt. Is the code you posted in fact
the same as the code actually in use in the database? I cannot see how it
could EVER have worked, at least not as it was posted.
-- 

             John W. Vinson [MVP]
0
John
5/14/2010 10:41:40 PM
I am great full, problem solved. 
-- 
Bardia


"Dirk Goldgar" wrote:

> "Bardia" <Bardia@discussions.microsoft.com> wrote in message 
> news:1033A0C1-098A-49F1-821B-44204CED34C7@microsoft.com...
> > Thanks, yes I copied the database file from one computer to another using
> > ScanDisk. But on second computer the same Access 2007 is installed. In any
> > case if your guess is correct how should I solve this problem?
> 
> First, in Windows explorer, right-click the database file and choose 
> Properties from the popup menu.  It may be that the file has been blocked, 
> as having come from another computer.  If so, there will be an Unblock 
> button displayed on the property sheet.  If you see that button, click it to 
> unblock the file.
> 
> If that isn't enough to fix the problem all by itself, then follow the 
> instructions in this article to designate the folder containing your 
> database as a trusted location:
> 
>     http://office.microsoft.com/en-us/help/HA100319991033.aspx
>     Create, remove, or change a trusted location for your files
> 
> -- 
> Dirk Goldgar, MS Access MVP
> Access tips: www.datagnostics.com/tips.html
> 
> (please reply to the newsgroup)
> 
0
Utf
5/14/2010 10:56:01 PM
Reply:

Similar Artilces:

Conditional Formatting Nested Formulas
I'm working with a large spreadsheet that has multiple status options. Each status has different criteria for example: Status Green Yellow Red T <60 >=60,<=80 >80 S <20 >=20,<=45 >45 D <30 >=30,<=55 >55 C <90 >=90,<=120 >120 B <30 >=30,<=60 >60 A <10 >=10,<=40 >40 I would like to apply conditional formats according to the status criteria. Is that possible given that each status has a different criterial. Thank you! One way to get going here .. Illustrated in this sample: http://www.freefileho...

Alternative to Calendar Control 8.0
I noticed that the Active X Calendar Control 8.0 control is not currently installed on my machines at work, and for now I am assuming that I will NOT be allowed to install it at my highly secure workplace. (I couldnt find it anywhere in the "Additional Controls" area) So.... Does anybody have any bright ideas on how to implement something similar to a calendar control?? I just want an easy way for my users to select a date. Right now we are simply typing a date in a target cell, but I thought it would be nice if we could select dates in a more flexible manner. The...

Receipt
Does anyone know whether it's possible to use a string as part of the conditional expression ? The code I'm trying to use is : <IF> <CONDITION> Entry.Item.ItemLookupCode = "GV" </CONDITION> <THEN>"XYZ"</THEN> <ELSE>"123"</ELSE> </IF> It's working fine if I replace the "GV" with a number, but always hits the ELSE expression when it's a string. I've also tried using a string variable here, which also fails. tnx TJ Nope, no string comparisons. -- -- Glenn Adams Tiber Creek Cons...

The ActiveX control could not be created
Hello, In the Project Center of PWA 2007 + SP2 and Aug CU, I did: Actions > Export Grid to Excel. But I got the error: "The ActivX control on which this feature depends could not be created. Because of this error, you can only copy the XML data to the clipboard. Do you want to continue?" How/where can I install this ActiveX control? Thanks for your help. Depending on your IE security settings, it should prompt you to install the ActiveX control. Have you set the site as a trusted site within IE? - Andrew Lavinsky Blog: http://blogs.catapultsystems.co...

Conditional formatting #17
Hi, I need to format a row or column based on the value a cell in that row. How could i do that? i.e. If the value of cell A1 is less than or equal to 0 u want the color pattern of B1 to H1 to change into green. tnx in advance, eqbal -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ Usually conditional formatting is done based on the value of that cell. In this case, use the drop down box to change from "Cell Value is" t "Formula is". Select a cell and use the Toolbar Format - Conditiona formatting. You need to write a formula with a l...

Time format control
Hi everyone, I have a time of 08:38 and would like to truncate the last minute by using formatting to achieve 08:30. I currently do this using a formula to remove the last minute. I have tried custom formatting of hh.m but I still get 08:38. I have even tried hh.m"0" but get 08:380. Any Ideas would be greatly appreciated. Regards Brad You can use this formula, it sounds as though you want round down to nearest 10th minute =FLOOR(A1,1/144) -- For everyone's benefit keep the discussion in the newsgroup. Regards, Peo Sjoblom "Brad kennedy" <brad_6663@hotmail...

PDFC Reader Control
Since I didn't get much of a response on a previous post, I am going to try this from a different angle. I have a form with a PDFC Reader control on it. Various pdf files are opened and viewed in the control. I would like to be able to identify and close specific documents from code and haven't been able to determine how this is done. Does anybody have any suggestions on how this could be done? From where did you get the control? Have you contacted them? -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Rich K" &l...

Can we bind a control to the static member variable ?
Hi, I was wondering, can we bind a control ? e.g. Can an edit box be bound with a static variable of type CEdit ?? I have tried but giving error.. ===== Regards, Jigar Mehta Jigar Mehta wrote: > Hi, > > I was wondering, can we bind a control ? > > e.g. Can an edit box be bound with a static variable of type CEdit ?? > > I have tried but giving error.. > ===== > Regards, > Jigar Mehta > > That is a very unusual thing to want to do. I don't know if it works because I've never needed such a thing. Can you tell us about the error you get,...

Cut/Copy/Paste not working for a subclassed edit control
What do I need to do to regain this functionality? Thanks, Drew Well, why did it stop working? AliR. "Drew" <dam@dam.dam> wrote in message news:ul$zFMjyHHA.1208@TK2MSFTNGP05.phx.gbl... > What do I need to do to regain this functionality? > > Thanks, > Drew > Maybe if you can tell us how to recreate it. AliR. "AliR (VC++ MVP)" <AliR@online.nospam> wrote in message news:FEOni.22648$RX.6967@newssvr11.news.prodigy.net... > Well, why did it stop working? > > AliR. > > > "Drew" <dam@dam.dam> wrote in me...

Conditional Formattting
I'd like to know if Excel will apply conditional formatting to a value if it falls within a range of values or named range. Specifically, I'd like to change the color of the cell to various colors based on which group or named range the initials of the person contained in that cell fall. Example: Group1 contains the initials KR, KM, Group 2 contains SE, PK. I'd like the conditional formatting to change the color of cells based on whether the initials contianed within that cell belong to Group1 or Group2. If I enter the initials KR into a cell, I'd like that cell to be green. If...

CMSFlexGrid control
Hi Group I have created a dll which houses dialogs and controls for all my application. I have a cmsflexgird control in one of a CPropertyPage dialog. I find i am unable to acess this control directly from my main application program. where else i am able to acess other standard controls& variables from the same property page. Currently iam acessing this control only from the interface class of the dll. -- Regards Did you remember to export the flexgrid classes that the ide created for you in your dll? Ali R. "beauwlf" <jamesg@pd.jaring.my> wrote in message new...

controling excel from vba access and using sub procedures
Hi All, I'm having trouble getting my code to work using sub procedures in my vba code, this only happens when i am interacting with excel. I've tried to copy all the dims and defs from the calling procedure but to no avail at this time. sample code below. Dim strPath As String Dim rst As DAO.Recordset Dim Excel_Application As Excel.Application Dim Excel_Workbook As Excel.Workbook Dim Current_Worksheet As Excel.Worksheet Dim Data_Range Dim Worksheet_Name Dim db As Database Dim rs As Recordset D_now = Format(Date, "dd-mm-yy") ' Formated to use as part of fi...

How to create a "really" transparence MFC control?
I wrote a D3D app based on the MFC dialog,the app's draw frequency is 30FPS.It has a main dialog,i create the D3D device on it,also i create some sub dialogs and controls on this main dialog.When i run this app, some errors appear.When i click or move the sub dialogs and controls it reflash on the background(I think the MFC's draw frequency unequal to the D3D app's draw frequency cause this problem), this bring on the bad effect.Is there any methods let this sub dialogs and controls didn't reflash or redraw themself to be "really" transparence:only receive or send...

Hide subforms control from main forms control
I have no idea how to hide some controls in my subform if value in a textbox in main form is >1 or =1.I can't write a code. Please help. Ciao New_Access wrote: > I have no idea how to hide some controls in my subform > if value in a textbox in main form is >1 or =1.I can't write a code. > Please help. Private sub form_current() if youControlName => "1" then forms!NameForm!SubForm.form.YouControlName.visible = false end if end sub -- Ciao Geppo geppo, why does access think my FormName is a fieldname. "geppo" <ccc@tin.it.inva...

ActiveX control problem
Sometime ago I created an OCX control in Visual Basic 6. It's basically two VB controls in one with some added features. I have been using it in a CDialog class and dropped in the dialog. It works fine on a Win98 machine but when installed on a WinXP machine the dialog is not displayed. Nothing happens! The control is registered on the XP machine. Thanks, Mark > Sometime ago I created an OCX control in Visual Basic 6. It's basically > two VB controls in one with some added features. I have been using it in > a CDialog class and dropped in the dialog. It works fine on a Win...

insert WPF user control in ppt slide
Any way to insert WPF user control in ppt slide? Thanks, Vatia ...

Auto Sum + Conditional Formatting
I would like to take one cell and have it with the Auto Sum feature. Here's the catch: I have applied a simple Conditional Formatting to a number of cells. The formatting is setup for blank formatting: equal to ="" There is nothing between the quotes, which tells the formatting that if there isnt anything in the cell, then give the cell a color. If ANY value is placed in the cell, take away the color. So with that said, is there a way to have the Auto Sum feature add up those cells and tell me how many that are left that need a value? For example, if there are 60 cells to...

control a sub/function via a dropdown menu
Hello, I have a dropdown menu on a chart. What must I do to control a sub/function depending on the selection of the dropdown menu. To make it clear .. every time I make a selection on the dropdown menu a function should be executed. Hope somebody can help me! Thanks in advance! daMike Mike - The dropdown is a Forms Toolbar dropdown, so you can right click on it to assign a macro. Also, you can link it to a cell, and the cell holds the index of the selected item. So your macro can check the index, then perform the appropriate actions. - Jon ------- Jon Peltier, Microsoft Excel MVP h...

Conditional Formatting in Excel 2007
Hi all- Can someone give me detailed directions on how to format a column so that the cells with 4's in them are highlighted yellow, the cells with 5's in them are red and the cells with 6's are blue. I have tried using the wizard but the numbers 1-3 get highlighted also. Thanks in advance. LabLawrence Select the cells Open the Conditional Format dialog, use Highlight Rules -> Equal To; in the left had box enter 4, in the right-hand select a colour combination as needed Repeat for 5. best wishes -- Bernard Liengme http://people.stfx.ca/bliengme Microso...

Graphic LCD ActiveX control
Hi, I'm looking for an ActiveX control which simulates an LCD panel and can be used to show different graphics within it. I've found one (Anon LCD, Puma) which can display only text, but no graphics in it. Appreciate if anyone could help me find one with graphic capabilities. Thanks, Sucharit ...

prob with conditional formatting formula
I am basically familiar with Excel 2000 but still a novice. This is th formula that I am trying to conditional format. =IF(SUM(B7:K7)=0,N6+M7-T7,(SUM(B7:K7)+M7+N6-T7)). If after seeing thi so far, your surprised that it works so am I. B7 through K7 ar various income columns. N6 is the previous CASH balance, M7 is anothe cash income column which is not taxed and T7 is a CASH payout column. Question - How do I write the formula in Cond. Format. to show a blan or invisible entry in column N6 if there is no activity in B7:K7 or M7 T7. I can only get part way there with =IF(SUM(B7:K7)=0,N6). ...

Controlling Static Controls at Runtime
This is a multi-part message in MIME format. ------=_NextPart_000_0098_01C40088.4260AA00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I need to change the properties of static text and groupbox at runtime = using VS .NET 2002. Specifically, I need to a.. Disable (gray out) b.. Enable c.. Hide (visible =3D false) d.. Show (visible =3D true) I've already changed the control ID to something other than IDC_STATIC = and created a control variable. ShowWindow(SW_HIDE) seems to have no = effect. Thanks. --=20 ~voidxor ------=_Next...

Multiple Column Conditional Formatting
Hi, I'm needing some help with performing a multiple column condition formatting. I have tried many "forumula is" in the conditional formatting with no success. I'm missing something. What I would like to have happen is, if the 2 conditions are true then I want the field to be color filled. Example: if the numeric value in k2>10 and the numeric value F2>100 then I would like cell K2 to be filled in red. Many thanks for your help Colleen one way: Select K2: CF1: Formula is =AND(K2>10,F2>100) Format1: <patterns>/Red In article &...

problem with clearing image in a CStatic control
Hi, I'm working on a code to load a preview image. I'm able to load the image in the control but unable to clear it. I'm developing something like an Open file dialog where in if I click a file I should see the preview of the file. Once I double click on a subfolder, it should show me the contents of the subfolder and reset the image in the Static control. Now I'm able to load my Bitmap using CStatic::SetBitmap(hBitmap). But once I click on a folder I should reset it to nothing and I dont know how to do that. Thank you. Rajesh. How about setting it to a bitmap that is 1x1 ...

Edit control height after font change
Hi all, I'm trying to change the font at runtime for some controls (textbox, combobox, ...), I did it using SetFont method. The problem I have is that comboboxes resizes themselves after font changing, modifying their height in order to contain text with the new font, and that is fine. TextBox controls, instead, don't resize themselves; I can resize their height, but I dont't know exactly which new value I should use. I can try to get font size with GetTextMetrics and add some gap value in order to calculate the height to assign to textbox controls, but I don't like this ...