Hi,
I'm trying to create some code so when a user adds a value to a table (I'm forcing them to do it through code) so that when the value is added, it will create a field in another table.
I'm not sure how to define it as a boolean field with the format yes/no. Right now it creates a boolean field, but the format is blank. I have the following code so far:
Dim db As Database
Dim tbl As TableDef
Dim fld As DAO.Field
Set db = CurrentDb()
Set tbl = db.TableDefs("tbl_BU_Saved_Reports")
Set fld = tbl.CreateField(temp_BU_name, dbBoolean)
tbl.Fields.Append fld
Set db = Nothing
Set tbl = Nothing
Set fld = Nothing
I'm trying to create some code so when a user adds a value to a table (I'm forcing them to do it through code) so that when the value is added, it will create a field in another table.
I'm not sure how to define it as a boolean field with the format yes/no. Right now it creates a boolean field, but the format is blank. I have the following code so far:
Dim db As Database
Dim tbl As TableDef
Dim fld As DAO.Field
Set db = CurrentDb()
Set tbl = db.TableDefs("tbl_BU_Saved_Reports")
Set fld = tbl.CreateField(temp_BU_name, dbBoolean)
tbl.Fields.Append fld
Set db = Nothing
Set tbl = Nothing
Set fld = Nothing