M
Mikey C
This is very odd - I have no idea what has happened!
When I try to imput a record into one of my forms (or edit an existing
one), it lets me do it until I get to the end field in the row and
then it will not let me tab any further - I have to close the form and
lose my changes or press undo.
At the end of each row I have created fields which are not enabled but
are visible which display the username and date of a new record and
the same for when any records are edited. Usually I can tab from the
previous field ('comments') to the next record or create a new record
- the username and date is automatically updated in the appropriate
fields.
I have noticed that when I now create or edit a record, the usernames
appear but not the dates. i have checked the code but can find no
problems with it (see below for code used).
It's worked with no problems until when I just noticed today. I
usually do a mixture of inputting directly to the form and importing
using a spreadsheet (when lots of data). I can still import from a
spreadsheet with no probs and am still able to edit / add new records
directly into the table.
It must be something related to the following code (as mentioned
above):
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.NewRecord Then
Me.[Created By] = CurrentUser()
Else
Me.[Last Modified By] = CurrentUser()
End If
If Me.NewRecord Then
Me.[Created Date] = Date
Else
Me.[Modified Date] = Date
End If
End Sub
Anyone got any ideas??
When I try to imput a record into one of my forms (or edit an existing
one), it lets me do it until I get to the end field in the row and
then it will not let me tab any further - I have to close the form and
lose my changes or press undo.
At the end of each row I have created fields which are not enabled but
are visible which display the username and date of a new record and
the same for when any records are edited. Usually I can tab from the
previous field ('comments') to the next record or create a new record
- the username and date is automatically updated in the appropriate
fields.
I have noticed that when I now create or edit a record, the usernames
appear but not the dates. i have checked the code but can find no
problems with it (see below for code used).
It's worked with no problems until when I just noticed today. I
usually do a mixture of inputting directly to the form and importing
using a spreadsheet (when lots of data). I can still import from a
spreadsheet with no probs and am still able to edit / add new records
directly into the table.
It must be something related to the following code (as mentioned
above):
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.NewRecord Then
Me.[Created By] = CurrentUser()
Else
Me.[Last Modified By] = CurrentUser()
End If
If Me.NewRecord Then
Me.[Created Date] = Date
Else
Me.[Modified Date] = Date
End If
End Sub
Anyone got any ideas??