You can't perform that action at this time!!

GailFialho

Registered User.
Local time
Today, 07:48
Joined
Nov 20, 2001
Messages
34
Hello Anyone Again!
I guess I'm full of problems this weekend.
As always, thank you in advance to anyone who might have the time to help me out.

First: the tables in question are described under the recent topic "Relationships" 10-13-02 with my name. That problem has been solved, but seems to have crated an even worse one.

At some point in time, I need to move a record from the Watch table to the actual Contracts table. I've accomplished this with a simple append query using the WatchID as criteria followed by
Set rs = db.OpenRecordset("tblContracts")
rs.MoveLast
'Grab the ContractID from the Contract table
Me.ContractID= rs!ContractID
rs.Close
This ID I use to append the WatchHistory records to the ContractHistory table.
Within the code, I then open the Contracts form to the new record. All of this happens quite nicely. At this point, I cannot close the Contracts form. I get the message "You can't perform that action at this time!!". The database locks up and I have to use ctrl+alt+delete.
PLEASE HELP
 
I am really not sure what is happening with your code, but here are a couple of suggestion... Have you stepped through the code to see what is happening at each stage? What happens if you remark out the code that opens the Contract form? Does everything work smoothly then? What happens if you just open the form without moving to a new record? Can you open a different form without a problem?

At this point I do not know what else to suggest...

Jack
 
Thank You Again

Yes I have stepped through the code. When I move the record from the Watch to the Contract I leave the Watch form open but not visible and open the Contract form. The close button on the Contract form checks if the Wach form is loaded, if so, makes it visible, then closes the Contract form, thereby enabling the user to return to the Watch form where he/she was working. Only instead of closing, I get the infamous message. I removed all of the code and the close button and just created a command button with access and get the same message. Right now, all I can do is have my user close the watch form, return to the main menu, and open the new Contract record by searching for it in the SearchRecords form. Not the best way to go but all I have right now.
Thanks again for your time and interest.:rolleyes:
 
I am grasping at straws, but have you explicitly referred to the form in the DoCmd.Close line of code? I.e. DoCmd.Close acForm, "frmContracts"? If you haven't tried this then give it a try using the actual name of your Contract form and see what happens...

Jack
 
I am now totally befuddled!!!
I commented out all of the code that was giving me the problem, as I have told you, and continued working. Just for the heck of it, I just went and removed the apostrophies and tested the code one more time to track the path and pinpoint exactly where the message was popping up. And it works just fine now! I didn't change anything. I don't get it. I have found Access to be mysterious on occasion.

Again, Thank You
 
Ah, the mysteries of Access! I am glad that things are finally working for you as they are supposed to, at long last!

Continued success with your project!

Jack
 

Users who are viewing this thread

Back
Top Bottom