Thank you and happy New Year
Kambiz
From: "John Viescas JohnV@msn.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>
To: MS_Access_Professionals@yahoogroups.com
Sent: Wednesday, December 23, 2015 2:53 PM
Subject: Re: [MS_AccessPros] Please help with VBA code
If it's opening in Add mode, then that must be the default for the form as designed. I you want to open to edit, do:
DoCmd.OpenForm, "Liquor", DataMode:=acFormEdit
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 Dec 23, 2015, at 8:26 PM, kenaf42@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
Access 2010. I use the following code to open a form from another form
Private Sub PayFor_AfterUpdate()
Select Case Me.PayFor
Case "Liquor"
' Open related form
DoCmd.OpenForm "Liquor"
This works fine but always opens the second form in ADD mode.
How can I add instruction to above code to open a form in either ADD or Edit mode?
Private Sub PayFor_AfterUpdate()
Select Case Me.PayFor
Case "Liquor"
' Open related form
DoCmd.OpenForm "Liquor"
This works fine but always opens the second form in ADD mode.
How can I add instruction to above code to open a form in either ADD or Edit mode?
__._,_.___
Posted by: Kambiz Afshartous <kenaf42@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (3) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar