copying ? Record #isn't working

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.
 
Thank you for the help with the copying. Let me try to explain about the
record #. On the bottom of the form is will say record 1 of 9. My auto
number is 8
record 2 auto number is 9
record 3 auto number is 7
record 4 auto number is 6
record 5 auto number is 5
record 6 auto number is 4
record 7 auto number is 3 and so on. Any suggestions? Thanks
 
When I'm entering data the record number and auto number are the same. When
I close out of it and open it back up is when it changes.
Thanks
 
When I'm entering data the record number and auto number are the same. When
I close out of it and open it back up is when it changes.
Thanks

Record numbers and Autonumbers are TWO DIFFERENT THINGS.

You should *not* expect them to be the same, nor should you care if
they are not.

The record number will vary depending on the sort order of the Form,
whether it's filtered or not, etc.

The Autonumber will not change; it's an arbitrary, meaningless unique
ID, and is *NOT* in any sense a "record number". Autonumbers will have
gaps, may not be sequential, can even become random.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top