|
-
Jul 8th, 2005, 12:37 AM
#1
[RESOLVED] error: The command or action 'SaveRecord' isn't available now (MS-Access 2003)
i am using a function in a module to open a form and add lines of code to the form's module. when i try to save the form using "DoCmd.RunCommand acCmdSaveRecord" i get the error "The command or action 'SaveRecord' isn't available now". what is stopping me from saving?
-
Jul 8th, 2005, 11:36 PM
#2
Re: error: The command or action 'SaveRecord' isn't available now (MS-Access 2003)
You are opening the form in design mode?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 9th, 2005, 04:30 AM
#3
Re: error: The command or action 'SaveRecord' isn't available now (MS-Access 2003)
yes.
should it be opened in a different way? i was sure it needed to be design mode to edit the code in the form's module.
-
Jul 10th, 2005, 11:25 AM
#4
Re: error: The command or action 'SaveRecord' isn't available now (MS-Access 2003)
Can you post some relevant code?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 10th, 2005, 06:22 PM
#5
Re: error: The command or action 'SaveRecord' isn't available now (MS-Access 2003)
VB Code:
Dim frm As Form, db As Database, con As Container, doc As Document
Dim mdl As Module
Set db = DBEngine(0)(0)
Set con = db.Containers("Forms")
For Each doc In con.Documents
DoCmd.OpenForm doc.Name, acDesign
Set frm = Forms(doc.Name)
Set mdl = frm.Module
'add code to form's module here
DoCmd.RunCommand acCmdSaveRecord
DoCmd.Close acForm, doc.Name
Next
-
Jul 10th, 2005, 06:41 PM
#6
Re: error: The command or action 'SaveRecord' isn't available now (MS-Access 2003)
Even though your opening the Form in design view, you actually tieing up the connection when you modify the module code that
is bound to the form. You need to try to modify it from the Application.VBE object. Checkout my CodeBank code on
"VB6 - Modify VBA Macro Code From VB". It shouldnt be too much to modify it for internal VBA use.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 10th, 2005, 08:27 PM
#7
Re: error: The command or action 'SaveRecord' isn't available now (MS-Access 2003)
great!
thanks for the help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|