kfschaefer
Registered User.
- Local time
- Today, 03:48
- Joined
- Oct 10, 2008
- Messages
- 58
I am generating a MDE file type of my development versions. I have the Nav window turned off, however, I do have a few linked tables that are refresh on demand via code from the user. the Nav window becomes accessible when these linked tables are being refreshed. How do I prevent this?
thanks,
Karen
Here is my current code that refreshes the linked table's datasource. It is here where the Nav Window opens. Someone from another forum recommended using a TableDef instead of TransferDatabase I am currently using.
thanks,
Karen
Here is my current code that refreshes the linked table's datasource. It is here where the Nav Window opens. Someone from another forum recommended using a TableDef instead of TransferDatabase I am currently using.
Code:
Public Function RecreateTable(ByVal stable As String) As Boolean
On Error GoTo RecreateTable_Error
RecreateTable = False
If stable = "TA_FTIR" Or stable = "TA_MeasFltr" Then
If IsTableExist(stable) = False Then
GoTo ResumeNext
Else
DoCmd.DeleteObject acTable, stable
End If
If Err.Number <> 0 Then
If Err.Number <> 7874 Then
MsgBox "Error deleting old table" & vbCrLf & Err.Description
Exit Function
End If
End If
Err.Clear
ResumeNext:
DoCmd.TransferDatabase acLink, "Microsoft Access", gAPFilePath, acTable, stable, stable
If Err.Number <> 0 Then
MsgBox Err.Description
Else
RecreateTable = True
End If
' ElseIf stable = "tblProjectTask" Then
' DoCmd.TransferDatabase acLink, "Microsoft Access", gAPFilePath, acTable, stable, stable
' RecreateTable = True
' Exit Function
End If
On Error GoTo 0
Exit Function
RecreateTable_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure RecreateTable of Module Functions"
End Function