From: Bardia on 13 May 2010 14:39 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
From: Steve on 13 May 2010 15:12 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(a)penn.com "Bardia" <Bardia(a)discussions.microsoft.com> wrote in message news:14F2E84F-B613-45DC-BBD7-8608B134204B(a)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
From: Dirk Goldgar on 13 May 2010 15:23 "Bardia" <Bardia(a)discussions.microsoft.com> wrote in message news:14F2E84F-B613-45DC-BBD7-8608B134204B(a)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)
From: Ruben Lopez on 13 May 2010 15:58 "Bardia" <Bardia(a)discussions.microsoft.com> wrote in message news:14F2E84F-B613-45DC-BBD7-8608B134204B(a)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
From: Jeff Boyce on 13 May 2010 16:15
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(a)discussions.microsoft.com> wrote in message news:14F2E84F-B613-45DC-BBD7-8608B134204B(a)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 |