Minggu, 19 Oktober 2014

Re: [MS_AccessPros] Open second form within first form not using button. Access 07

 

Dear kenaf42 (name?)-


It would be better to use the AfterUpdate event of the control.  The code will look something like this:

Private Sub PaidFor_AfterUpdate()

    ' If user entered "Vehicle",
    If Me.PaidFor = "Vehicle" Then
        ' Open related form
        DoCmd.OpenForm "Name Of Other Form"
    End If

End Sub


John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)




On Oct 19, 2014, at 12:58 AM, kenaf42@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

I need VBA code to open second form when curser leaves (on Exit) certain Text Box on first form.

Example:

Form A "expenses" has text box "Paid For" if user type VEHICLE in this box on EXIT I would like for Form related to vehicles open. All forms are popup.

I do not want using a button.



__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

.

__,_._,___

Tidak ada komentar:

Posting Komentar