mohammadagul
PrinceAtif
- Local time
- Today, 11:46
- Joined
- Mar 14, 2004
- Messages
- 298
I am trying to use the following code to change the Currency field property in all my tables from Currency to Standard.
Function ChangeCurrency()
Dim db as database
Dim tbldef as TableDef
Dim fld as Field
set db = CurrentDb
For Each tbldef in db.TableDefs
If left(tbldef.NAME, 4)<> "Msys" Then
Debug.Print tbldef.NAME
If fld.Type = dbCurrency then
fld.format = "Standard"
End If
Next
End If
Next
End Function
Function ChangeCurrency()
Dim db as database
Dim tbldef as TableDef
Dim fld as Field
set db = CurrentDb
For Each tbldef in db.TableDefs
If left(tbldef.NAME, 4)<> "Msys" Then
Debug.Print tbldef.NAME
If fld.Type = dbCurrency then
fld.format = "Standard"
End If
Next
End If
Next
End Function