Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 16th, 2005, 09:10 AM
Authorized User
 
Join Date: Aug 2005
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default Save Dynamically created forms

Hello, I need to save forms that have been created dynamically. To do this I used the following code

Code:
DoCmd.OpenForm a, acNormal, , , acFormEdit, acWindowNormal, searchQuery

DoCmd.Save acForm, a

DoCmd.Close acForm, a

But I get the error:

The Save action was cancelled.:(

Any ideas?


Thanks

ÐaÐeVi£
__________________
ÐaÐeVi£
 
Old August 17th, 2005, 07:24 AM
Authorized User
 
Join Date: Aug 2005
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Does this issue have to do with permissions? I have been googling it and most relevant searches have something to do with a Front End/Back End system.

I split my database, and right now I have exclusive access, but it still does not work.

Thanks

ÐaÐeVi£
 
Old August 17th, 2005, 08:29 AM
Authorized User
 
Join Date: Aug 2005
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok yesterday I tried the following and it was still giving me the
'The Save action was cancelled.' error.

Code:
Dim a As String
a = SearchResultsForm.Name
DoCmd.OpenForm a, acNormal, , , acFormEdit, acWindowNormal, searchQuery

DoCmd.Save
DoCmd.Close acForm, a

Today when I came back and tested it, it saved the form perfectly.

This really worries me.

This tells me that it might be a permissions issue. The permissions were at a different state yesterday than they are today. I gave myself exclusive access and administrator privleges yesterday, and there were no permissions set before yesterday. Today I logged on, didnt change a thing, and those forms were automatically saved without the annoying error.

So maybe the new permissions rules only took effect after I logged back in today? There isnt enough proof to claim this is what the problem was, or that logging out and logging back in is any kind of solution.

Am I correct in my thinking? Hope I havent confused you.

Maybe what I am asking is how can I make sure this more stable when more users are using this at the same time? Or even one user?

Thanks

ÐaÐeVi£





Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help me about dynamically created controls vingo_mail ASP.NET 2.0 Basics 1 March 24th, 2008 12:54 PM
Problems with Dynamically created controls Preeti_Singh .NET Framework 1.x 1 March 7th, 2007 01:30 PM
Dynamically created code Puck312 Pro VB 6 3 September 7th, 2005 01:21 PM
Dynamically created controls katsarosj ASP.NET 1.0 and 1.1 Basics 4 February 4th, 2004 09:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.