Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replica Set Expiration warning

Status
Not open for further replies.

dannyw

IS-IT--Management
Sep 24, 2002
5
GB
We have an Access database for the events which we run. We were based on two sites and so had the design master here and a replica at the other site and synchronised them every week. For a couple of years now we have been on one site on a network and have no need for replication. However the following warning has just appeared in the last few days and the countdown is running. It now says
"This member of the replica set will expire in 5 days because it hasn't been synchronised with another member of the replica set.
If the member is allowed to expire, it can no longer be synchronised with any other member of the replica set.
Synchronise with another member as soon as possible. To Synchronise, point to Replication on the Tools menu, and click Synchronise Now."
Unfortunately we no longer have another database to synchronise with. Can anybody reassure me that if I take no action our database will work. If the only thing that will happen is that it can't synchronise with any other member of the replica set, this would be okay as we do not need to do this any more.
Please help.

Thanks

Danny
 
Danny,
If you no longer have another replica to synchronize with, you should convert your database back to a stand alone. To do this, open a new database and import all objects from the current active replica EXCEPT for the tables. Then close the new database. To get the tables added, open the active replica you just used, and open a new query. For this query select the first of your tables (this will be repeated for each) and select all the fields EXCEPT for the system fields (s_Generation, s_GUID, s_Lineage). Now go up to "Query" on the menu and then select "Make Table". In the pop-up box, be sure that the "Current Database" option is selected, and then you need to select the same table name as used in your query from the drop list from the Current Database. Then click the option that says "Another Database" and write in the file path and file name of the new database you created. Click OK and then run the query (click on the red exclaimation point at the top). Now if you go open the new database, the table should be there and if you open the table, the system fields will not be there. Success! Repeat this for every table in the current replica by going back to the query, remove the table you just did, and add the next table. NOTE when you do this for each subsequent table, in the Make Table dialog box, you will need to first change the option to "Current Database" to find the table you just added to the query from the current database, and then change the option again to "Another Database" to activate the path. You won't need to rewrite the path each time.
Problems? - write back.
Good luck!

 
Att Susanhawk

Thanks for your help with that one. Most of it worked brilliantly and written in language I could understand, which is a bonus. However I am having trouble with the Switchboard Manager. When you opened the old database the S M swung into action and opened up allowing users to choose from a menu. Now it throws up a VB error. If it helps at all the first and last lines in this section "Private Sub Form_Open(Cancel As Integer)
' Minimize the database window and initialize the form.

Dim dbs As Database" in the Visual Basic section tell me where the error is but it is Chinese to me. Hoping you can help since you were fab last time.

Thanks

Danny
 
Danny,
Without seeing your code, or having an opportunity to step through it, I can't tell what the problem is.
First thing I would suggest though is to check the following:
1. Compare the tables included in your new database to those in the replicated database. You want to be sure you didn't miss any of them.
2. Open each table in the new database and check to see that the system fields were in fact removed. If not, just open the table in design view and delete the "s_...." fields.
3. Test opening again, and if it still doesn't work, delete the table called "Switchboard Items" or "Switchboard Objects" and then close the new database, and go back to the replica and again run the make table query for the "Switchboard Items" table. Now test the open of the database.

If you still have a problem, please copy and paste the code for the entire sub where the debug stops, and write down for me the exact wording of the error. Maybe I'll be able to make some sort of sense of it. I'll certainly be glad to try!
Luck!!
 
Att Susan

I have given it my best shot and it's still not working. When the new database is opened the switchboard doesn't start and when you open the switchboard form the following error comes up in the Visual Basic screen
"Option Compare Database
Option Explicit

Private Sub Form_Open(Cancel As Integer)
' Minimize the database window and initialize the form.

Dim dbs As Database
Dim rst As Recordset

On Error GoTo Form_Open_Err

' Minimize the database window.
DoCmd.SelectObject acForm, "Switchboard", True
DoCmd.Minimize

DoCmd.Hourglass False
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("My Company Information")
If rst.RecordCount = 0 Then
rst.AddNew
rst![SalesTaxRate] = 0
rst.Update
MsgBox "Before using this application, you need to enter your company name, address and related information."
DoCmd.OpenForm "My Company Information", , , , , acDialog
End If
rst.Close
dbs.Close

' Move to the switchboard page that is marked as the default.
Me.Filter = "[ItemNumber] = 0 AND [Argument] = 'Default' "
Me.FilterOn = True

Form_Open_Exit:
Exit Sub

Form_Open_Err:
MsgBox Err.Description
Resume Form_Open_Exit

End Sub

Private Sub Form_Current()
' Update the caption and fill in the list of options.

Me.Caption = Nz(Me![ItemText], "")
FillOptions

End Sub

Private Sub FillOptions()
' Fill in the options for this switchboard page.

' The number of buttons on the form.
Const conNumButtons = 8

Dim dbs As Database
Dim rst As Recordset
Dim strSQL As String
Dim intOption As Integer

' Set the focus to the first button on the form,
' and then hide all of the buttons on the form
' but the first. You can't hide the field with the focus.
Me![Option1].SetFocus
For intOption = 2 To conNumButtons
Me("Option" & intOption).Visible = False
Me("OptionLabel" & intOption).Visible = False
Next intOption

' Open the table of Switchboard Items, and find
' the first item for this Switchboard Page.
Set dbs = CurrentDb()
strSQL = "SELECT * FROM [Switchboard Items]"
strSQL = strSQL & " WHERE [ItemNumber] > 0 AND [SwitchboardID]=" & Me![SwitchboardID]
strSQL = strSQL & " ORDER BY [ItemNumber];"
Set rst = dbs.OpenRecordset(strSQL)

' If there are no options for this Switchboard Page,
' display a message. Otherwise, fill the page with the items.
If (rst.EOF) Then
Me![OptionLabel1].Caption = "There are no items for this switchboard page"
Else
While (Not (rst.EOF))
Me("Option" & rst![ItemNumber]).Visible = True
Me("OptionLabel" & rst![ItemNumber]).Visible = True
Me("OptionLabel" & rst![ItemNumber]).Caption = rst![ItemText]
rst.MoveNext
Wend
End If

' Close the recordset and the database.
rst.Close
dbs.Close

End Sub

Private Function HandleButtonClick(intBtn As Integer)
' This function is called when a button is clicked.
' intBtn indicates which button was clicked.

' Constants for the commands that can be executed.
Const conCmdGotoSwitchboard = 1
Const conCmdOpenFormAdd = 2
Const conCmdOpenFormBrowse = 3
Const conCmdOpenReport = 4
Const conCmdCustomizeSwitchboard = 5
Const conCmdExitApplication = 6
Const conCmdRunMacro = 7
Const conCmdRunCode = 8

' An error that is special cased.
Const conErrDoCmdCancelled = 2501

Dim dbs As Database
Dim rst As Recordset

On Error GoTo HandleButtonClick_Err

' Find the item in the Switchboard Items table
' that corresponds to the button that was clicked.
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("Switchboard Items", dbOpenDynaset)
rst.FindFirst "[SwitchboardID]=" & Me![SwitchboardID] & " AND [ItemNumber]=" & intBtn

' If no item matches, report the error and exit the function.
If (rst.NoMatch) Then
MsgBox "There was an error reading the Switchboard Items table."
rst.Close
dbs.Close
Exit Function
End If

Select Case rst![Command]

' Go to another switchboard.
Case conCmdGotoSwitchboard
Me.Filter = "[ItemNumber] = 0 AND [SwitchboardID]=" & rst![Argument]

' Open a form in Add mode.
Case conCmdOpenFormAdd
DoCmd.OpenForm rst![Argument], , , , acAdd

' Open a form.
Case conCmdOpenFormBrowse
DoCmd.OpenForm rst![Argument]

' Open a report.
Case conCmdOpenReport
DoCmd.OpenReport rst![Argument], acPreview

' Customize the Switchboard.
Case conCmdCustomizeSwitchboard
' Handle the case where the Switchboard Manager
' is not installed (e.g. Minimal Install).
On Error Resume Next
Application.Run "WZMAIN80.sbm_Entry"
If (Err <> 0) Then MsgBox &quot;Command not available.&quot;
On Error GoTo 0
' Update the form.
Me.Filter = &quot;[ItemNumber] = 0 AND [Argument] = 'Default' &quot;
Me.Caption = Nz(Me![ItemText], &quot;&quot;)
FillOptions

' Exit the application.
Case conCmdExitApplication
CloseCurrentDatabase

' Run a macro.
Case conCmdRunMacro
DoCmd.RunMacro rst![Argument]

' Run code.
Case conCmdRunCode
Application.Run rst![Argument]

' Any other command is unrecognized.
Case Else
MsgBox &quot;Unknown option.&quot;

End Select

' Close the recordset and the database.
rst.Close
dbs.Close

HandleButtonClick_Exit:
Exit Function

HandleButtonClick_Err:
' If the action was cancelled by the user for
' some reason, don't display an error message.
' Instead, resume on the next line.
If (Err = conErrDoCmdCancelled) Then
Resume Next
Else
MsgBox &quot;There was an error executing the command.&quot;, vbCritical
Resume HandleButtonClick_Exit
End If

End Function
&quot;
If any of that makes any sense to you and you can see at a glance what the problem is I would be eternally grateful. As I am just very confused.

Thanks

Danny
 
Danny,
Did you set your Switchboard as the start-up form in the new database?
Go to Tools - Startup and a dialog box pops up. In it, you need to select the Switchboard from the Display form drop list. Try that and let me know if that takes care of your problem.
Luck!!

Susan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top