This article was previously published under Q210224
This article has been archived. It is offered "as is" and will no longer be updated.
Advanced: Requires expert coding, interoperability, and multiuser skills.
This article applies only to a Microsoft Access database (.mdb).
Microsoft Jet Replication does not have a property that specifies whether areplica is the Design Master of a replica set. However, this articledemonstrates how you can use Visual Basic for Applications to determine ifa database is the Design Master.
To determine if a database is the Design Master, follow these steps:
Create a module, and then type the following line in the Declarations section if it is not already there:
On the Tools menu, click References.
Add the Microsoft DAO 3.6 Object Library.
Type the following procedure:
Function IsDesignMaster() ' This function determines if the current database is ' the Design Master and returns True if the current ' database is the Design Master and returns False if ' the current database is not the Design Master. The ' function returns Null if the database is not a ' replicable database. Dim db As DAO.Database Set db = CurrentDb() If db.DesignMasterID = db.ReplicaID Then If db.ReplicaID = "" Then ' Check to see if db is replicable. IsDesignMaster = Null Else IsDesignMaster = True End If Else IsDesignMaster = False End IfEnd Function
To test this function, type the following line in the Immediate window, and then press ENTER:
Note that either Null, True, or False is returned.