It can be done. The problem is that you are looking at your project and I
am not. A text box (along with just about anything you can put on a form or
report) is a control. Some controls such as lines and labels are there to
help the user, but cannot be tied directly to a field in the form's or
report's Record Source. Other controls such as text boxes may be bound to a
field (the field is the Control Source for that control) or unbound. An
unbound text box with the Control Source =Date() will always show today's
date when you navigate to any record. To have the text box show a stored
date you need to set the text box Control Source to a date field in the
form's or report's Record Source, and you need to store the date in that
field. If you have a command button to start a new Issue, it's Click Event
could be:
Me.[IssueOpenDate] = Date
You may want to lock things down so that it is only possible to enter the
date just once. One possibility is something like this in the command
button Click event:
If Me.NewRecord Then
Me.[IssueOpenDate] = Date
End If
Or maybe be in the form's Current event:
If Not IsNull(Me.[IssueOpenDate]) Then
Me.txtIssueOpenDate.Locked = True
End If
There are other options, depending on your specific needs. IssueOpenDate is
the name of the table field, and txtIssueOpenDate is the name of the text
box bound to the field. It is best if they have different names, although
Access gives them the same name by default. Use names of your own choosing,
but it is best if they contain only numbers, letters, and underscores. If
they contain anything else, including spaces, the name must be enclosed in
square brackets; otherwise the square brackets are not necessary.
For the counter, an unbound text box could have the Control Source:
=DateDiff("d",Date,[IssueOpenDate])
blake7 said:
Sorry Bruce, i must be confusing the hell out of you, the form when run
via
the query is showing a selection from the 100 or so entries assigned to a
team member, each individual quality issue has a unique reference number,
the
form has various details relating to the issue, one of these we want to
show
is how long the issue has been open for in days (open means issue not yet
been resolved) this is a visual reminder to the team member that the issue
is
still 'open', the problem is freezing the open date, because using =date()
function in any check boxes always returns the value of the current day
etc.
I just want the current date to enter a field on the form when the user
clicks 'date opened' which starts a visual counter on screen to count the
days elapsed and the other date (date closed) to enter another field on
the
form, this then stops the counter. I promise I will give up if this cannot
be
done. Regards Tony