Identify Pasted Row

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In Access 2000, I have a datasheet where the first field is CropYear. In
that field's Before Update event, I'm checking to make sure it's not
duplicated. To check it, I pass its activecontrol.value to a utility module.


That's working nicely, except when I copy and paste a row into the
datasheet. After pasting, the CropYear Before_Update event runs and I get a
run time 2474 error that says "The expression you entered requires the
control to be in the active window." So even though the CropYear
Before_Update event is running, the system control is not in that window.

I know I can pass the field name to the utility module instead of
activecontrol.value, but then I will get the duplicate CropYear message. I
don't want that. Is there a way I can identify when I've pasted a record?
Or is there a way I can find out where the system control is? If so, I can
check for that at the beginning of the CropYear Before_Update and bypass that
event's code.

I'll very much appreciate any help anyone can give me on this!
 
I forgot to mention in my previous post that I'm working on a project. So
it's named Citrus.adp rather than Citrus.mdb.
 
Back
Top