A
abregman
All,
I'm creating a db where the history of submitted documents can be traced.
However, these documents can be submitted more than once (actually they will
be submitted untill the document is approved). Therefore, we need to be able
to enter more than one submitdate.
Because the number of submitdates (every submitdate is a revisison) can
differ for every document I want to create a new revisionfield for each
submitdate (new submitdate = revisionnumber0 or current revisionnumber+1) and
fill this with the current date.
On the internet I found some code which I altered. However this code only
creates a new field one time and does not fill it with the current date. Can
anyone help me with this code, so when the submitdate box is clicked a new
revision field is created (new submitdate = revisionnumber0 or current
revisionnumber+1) and filled with the current date?
The code I have is printed below:
Private Sub SubmitDate1_Click()
'create new revisonfield in the submitdates table and fill this with the
currentdate, and lock afterwards.
Dim dbs As DAO.Database
Dim tdfSubmitdates As DAO.TableDef
Dim fldTemp As Field
Set dbs = CurrentDb()
Set tdfSubmitdates = dbs.TableDefs("Submitdates")
Set fldTemp = tdfSubmitdates.CreateField("Revisions", dbText, 255)
With tdfSubmitdates.Fields
Append fldTemp
End With
End Sub
Thanks for helping me!
Regards,
Arjan
I'm creating a db where the history of submitted documents can be traced.
However, these documents can be submitted more than once (actually they will
be submitted untill the document is approved). Therefore, we need to be able
to enter more than one submitdate.
Because the number of submitdates (every submitdate is a revisison) can
differ for every document I want to create a new revisionfield for each
submitdate (new submitdate = revisionnumber0 or current revisionnumber+1) and
fill this with the current date.
On the internet I found some code which I altered. However this code only
creates a new field one time and does not fill it with the current date. Can
anyone help me with this code, so when the submitdate box is clicked a new
revision field is created (new submitdate = revisionnumber0 or current
revisionnumber+1) and filled with the current date?
The code I have is printed below:
Private Sub SubmitDate1_Click()
'create new revisonfield in the submitdates table and fill this with the
currentdate, and lock afterwards.
Dim dbs As DAO.Database
Dim tdfSubmitdates As DAO.TableDef
Dim fldTemp As Field
Set dbs = CurrentDb()
Set tdfSubmitdates = dbs.TableDefs("Submitdates")
Set fldTemp = tdfSubmitdates.CreateField("Revisions", dbText, 255)
With tdfSubmitdates.Fields
Append fldTemp
End With
End Sub
Thanks for helping me!
Regards,
Arjan