There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Business Applications
Tag Cloud
audio blue blue screen boot bsod compaq computer cpu crash dell drivers dvd error excel firefox format freeze freezing hard drive hardware install internet internet explorer kb951748 lan laptop loss of internet malware memory motherboard network networking outlook outlook 2007 problem restart screen security slow sound trojan update virus vista windows windows xp winxp wireless zonealarm zone alarm
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Business Applications >
Solved: Access 2003 & Batch File


Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
Rollin_Again's Avatar
Distinguished Member with 2,906 posts.
 
Join Date: Sep 2003
Location: Atlanta, GA - Planet Earth
Experience: Brilliant When Sober
15-Jul-2008, 01:36 PM #46
Quote:
Originally Posted by gamecockfan View Post
Are you able to open the tables. forms, etc.?
Yes I am.

Is the backup DB being moved to a different location after the copy is being made?

One potential problem that I see is if the DB is copied to a different location is that the when the DB copy is made the AutoExec macro and it's associated VB code is also copied to the backup copy. When you try to open the backup copy the AutoExec macro will try to fire again. Since you "hard coded" the value for OldDbName in the original code an error may occur because the filepath will change if opened from a different location.

Regards,
Rollin
__________________
Protect your computer and keep it free of pests and other spyware. Download AdAware, Spybot, ZoneAlarm and lots of other great utilities at PC World / SnapFiles / Major Geeks, Tech Guy Stuff

Help Keep this site free by making a small donation

http://www.techguy.org/donate.html

tsghelp at live dot com / support

Last edited by Rollin_Again : 15-Jul-2008 01:47 PM.
computerman29642's Avatar
Computer Specs
Senior Member with 1,669 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
15-Jul-2008, 01:40 PM #47
Quote:
Originally Posted by Rollin_Again View Post
Yes I am. What happens if you copy the backup DB to the same directory as the original DB?

Regards,
Rollin
It does that now.

I believe I have found that the problems is when the folder i son a network. I just tried using the code on a database that is on my desktop, and it opened just fine.

However, I thought I tested that before.
computerman29642's Avatar
Computer Specs
Senior Member with 1,669 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
15-Jul-2008, 01:43 PM #48
Nevermind, I just tried it on the network, and it worked just fine. I am not sure what was going on.

Is this possible....Could the macro be setup to run at the end of the week or month?
computerman29642's Avatar
Computer Specs
Senior Member with 1,669 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
15-Jul-2008, 01:47 PM #49
Well, it was working. When I was using the backup copy of the database, the buttons on the sitchboard stopped working. I got an error message "Command could not be executed."

Have you tried clicking on all the buttons, and then re-clicking the first one again?
Rollin_Again's Avatar
Distinguished Member with 2,906 posts.
 
Join Date: Sep 2003
Location: Atlanta, GA - Planet Earth
Experience: Brilliant When Sober
15-Jul-2008, 02:02 PM #50
Quote:
Originally Posted by gamecockfan View Post
Have you tried clicking on all the buttons, and then re-clicking the first one again?
Which buttons are you talking about? I am unable to duplicate the error.

BTW...If you want the code to fire on the last day of the month you can use an IF statement

Code:
If Date = DateSerial(Year(Date), Month(Date) + 1, 0) Then

'Your code here

End If
Regards,
Rollin
computerman29642's Avatar
Computer Specs
Senior Member with 1,669 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
15-Jul-2008, 02:09 PM #51
I do not remember how the database works that I sent you. When I open my database, a switchboard is displayed.

When the backup copy is created, I can open the backup copy and click the buttons on the switchboard just fine. However, onece I go down the list, and then re-click the first button on the sitchboard again, I get the error message.

Would you like for me to capture the error message?
__________________
Computerman29642

"I can do all things through Christ which strengtheneth me."
(Philippians 4:13)
___________________________________________________

“Give, and it shall be given to you. For whatever measure
you deal out to others, it will be dealt to you in return.”
(Luke 6:38)
Rollin_Again's Avatar
Distinguished Member with 2,906 posts.
 
Join Date: Sep 2003
Location: Atlanta, GA - Planet Earth
Experience: Brilliant When Sober
15-Jul-2008, 02:16 PM #52
I don't get a switchboard on the copy you sent to me. Can you send me an updated copy?

Regards,
Rollin
computerman29642's Avatar
Computer Specs
Senior Member with 1,669 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
15-Jul-2008, 02:20 PM #53
I have attached a updated version of the database as you requested.
Attached Files
File Type: zip Movie_Current.zip (121.6 KB, 3 views)
computerman29642's Avatar
Computer Specs
Senior Member with 1,669 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
15-Jul-2008, 02:22 PM #54
I forgot to change the database name in the Backup module for the attached database.
Rollin_Again's Avatar
Distinguished Member with 2,906 posts.
 
Join Date: Sep 2003
Location: Atlanta, GA - Planet Earth
Experience: Brilliant When Sober
15-Jul-2008, 03:41 PM #55
Did you protect the code? Since I can't access the module to make the name change the DB is not being copied.

Regards,
Rollin
computerman29642's Avatar
Computer Specs
Senior Member with 1,669 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
15-Jul-2008, 03:48 PM #56
Sorry, I changed the startup of the database. I have re-attached the database. The code should work now.
Attached Files
File Type: zip Movie_Current2.zip (121.5 KB, 4 views)
Rollin_Again's Avatar
Distinguished Member with 2,906 posts.
 
Join Date: Sep 2003
Location: Atlanta, GA - Planet Earth
Experience: Brilliant When Sober
15-Jul-2008, 05:45 PM #57
I'm getting the same error now too. Can you repost the DB after removing any protection you have added. I am unable to view the tables and code since the print option is the only available option I have.

Regards,
Rollin
computerman29642's Avatar
Computer Specs
Senior Member with 1,669 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
15-Jul-2008, 05:48 PM #58
Once again I apologize. I have attached the requested file.
Attached Files
File Type: zip Movie_Current3.zip (123.6 KB, 4 views)
Rollin_Again's Avatar
Distinguished Member with 2,906 posts.
 
Join Date: Sep 2003
Location: Atlanta, GA - Planet Earth
Experience: Brilliant When Sober
15-Jul-2008, 07:17 PM #59
I am clueless why this is happening. The problem does not occur when the backup copy is made from the unprotected DB and the switchboard is run manually. Maybe OBP might be able to shed some light on this. I'll send him a PM.

Regards,
Rollin
computerman29642's Avatar
Computer Specs
Senior Member with 1,669 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
16-Jul-2008, 08:54 AM #60
Sounds good. Thank you very much Rollin for the help and effort.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 03:18 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.