Re: copying ? Record #isn't working



On Wed, 25 Oct 2006 07:49:02 -0700, Mary wrote:

I'm updating a access program someone else did. I have access 2003. I have
two questions. First I copied the program into another file so I wouldn't
lose the old one. I have made the changes but I'm not sure how to put it back
to the old file. There is some information from the old file that we want to
keep, so I'm not sure how to do this. The other problem is I have a auto
record # which seems to be working fine but the record number at the bottom
isn't working. When you save the document and close out of it, and go back
into it the record # on the bottom is different. It goes back to one. If
anyone has any suggestions I would greatly appreciate it. Thanks in advance.

1) If you have copied to old database there is no need to put the
changes back into the old database. Just replace it with the updated
one.

Let's say your original database is named "MyDb.mdb" and it's in
"C:\MyFolder"
If you wish to keep the old database simply rename it "MyDbOLD.mdb".
Then re-name the new updated database to the original database name
("MyDb.mdb") and move it to the wanted file.
You can do this manually or by using VBA code.

Sub MoveAndRename()
Dim OldName As String
Dim NewName As String

' Rename original Db to a new name in the same folder
OldName = "C:\MyFolder\MyDb.mdb"
Name OldName As ""C:\MyFolder\MyDbOLD.mdb"

' Rename the updated Db to the original name and move it to the other
folder.
OldName = "C:\MyNewFolder\MyUpdatedDb.mdb"
NewName = "C:\MyFolder\MyDb.mdb"
Name OldName As NewName
End Sub

2) I'm not sure of what you mean by the record number going back to 1
when you open the form. It's supposed to open at the first record
unless you have told it to open differently.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
.



Relevant Pages

  • Re: Feature Pack / SP2
    ... What you can do is copy the current database to another folder like \Windows ... Install FP2007 on the current installation. ... rename the folders when you want to switch between the two. ... turn off the database engine before you do the rename. ...
    (microsoft.public.windowsxp.embedded)
  • Re: The amazing disappearing VBA code
    ... Windows Explorer, and make a copy of your database, as Access is about to ... the original database wasn't deleted because it is read-only. ... might be an issue with mapped drives like when were the last updates from MS ... resource management in the OS or any other application is hoarding RAM. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Run-time error 2465 after database import
    ... The original database is in Access 2000 and the ... and importing everything from the original database. ... Visual Basic Editor - Tools / database Properties ... If I go into debug at this point and try using PaddedLotNumber ...
    (microsoft.public.access.formscoding)
  • Re: Altering Identity Columns for Bidirectional Transasctional Replication
    ... Backup the original Database containing all the data: ... Destroy the orginal database and recreate the database only. ... Take the scripts that created the original database (if none is ...
    (microsoft.public.sqlserver.replication)
  • Re: autonummering in table gives problems
    ... manually recreate the "bad" records in the new table, ... sequence of AutoNumber identifications may be regenerated (but don't count ... I made the new database with all the ... > the original database). ...
    (comp.databases.ms-access)

Loading