This example makes a replica from the Design Master of Northwind.mdb, and then returns the replica's ReplicaID, which is automatically created by the Microsoft Jet database engine. (If you have not yet created a Design Master of Northwind, refer to the Replicable property, or change the name of the database in the code to an existing Design Master.)
Sub MakeReplicaReplicaIDX()
Dim dbsNorthwind As Database
Dim prpReplicaID As Property
Dim dbsReplica As Database
Set dbsNorthwind = OpenDatabase("Northwind.mdb")
' Makes a new replica.
dbsNorthwind.MakeReplica "Nwreplica2.mdb", _
"second replica"
dbsNorthwind.Close
' Opens the new replica to read its ReplicaID.
Set dbsReplica = OpenDatabase("Nwreplica2.mdb")
Debug.Print dbsReplica.ReplicaID
dbsReplica.Close
End Sub