D
DubboPete
Hi all,
I have tried error trapping a field, whereby if the value of [field2] does
not match [field1] then it should exit sub and stay there for correction.
It (A2K) don't want to do that, and currently I am having to use the
'gotFocus' event of the next field [field3] to force it back to [field2]!
<basic code snippet... Events... on dirty = true, or AfterUpdate, or Exit>
If me.[field2] <> me.[field1] Then
msgbox "yada yada.", vbInformation
me.[field2].setfocus
Exit Sub
End if
</snippet>
The dang thing moves to [field3] regardless, so at the mo I have [field3]
checking the same values, and...
<snip2>
Private Sub Field3_gotfocus()
If me.[field2] <> me.[field1] Then
me.[field2].setfocus
End If
</snip2>
Code above is not copied direct from the event, hence the irregularities
with me and Me instances.... but it hopefully gives the general idea of what
I am trying to achieve...
Is there any reason why the focus cannot stay with [field2]?
your list's own 17th century goat-herder,
DubboPete
I have tried error trapping a field, whereby if the value of [field2] does
not match [field1] then it should exit sub and stay there for correction.
It (A2K) don't want to do that, and currently I am having to use the
'gotFocus' event of the next field [field3] to force it back to [field2]!
<basic code snippet... Events... on dirty = true, or AfterUpdate, or Exit>
If me.[field2] <> me.[field1] Then
msgbox "yada yada.", vbInformation
me.[field2].setfocus
Exit Sub
End if
</snippet>
The dang thing moves to [field3] regardless, so at the mo I have [field3]
checking the same values, and...
<snip2>
Private Sub Field3_gotfocus()
If me.[field2] <> me.[field1] Then
me.[field2].setfocus
End If
</snip2>
Code above is not copied direct from the event, hence the irregularities
with me and Me instances.... but it hopefully gives the general idea of what
I am trying to achieve...
Is there any reason why the focus cannot stay with [field2]?
your list's own 17th century goat-herder,
DubboPete