Hello,
I'm using the following code to hide my tables:
Problem is, one of my tables has attachment. When this function is called at startup, attachment from the record is deleted. I don't know what's going on. I need help how to fix this.
Best Regards
Abdullah
I'm using the following code to hide my tables:
Rich (BB code):
Function HideTables(Hide As Boolean)
Dim db As Database
Dim tdf As TableDef
Dim Tbl As String
Set db = CurrentDb
For Each tdf In db.TableDefs
Tbl = tdf.name
If Not (Tbl Like "USys*" Or Tbl Like "MSys*" Or Tbl Like "~*") Then
If Hide = True Then
tdf.Attributes = dbHiddenObject
Else
tdf.Attributes = 0
End If
End If
Next
Set db = Nothing
End Function
Problem is, one of my tables has attachment. When this function is called at startup, attachment from the record is deleted. I don't know what's going on. I need help how to fix this.
Best Regards
Abdullah