Identify Pasted Row

M

Mary Fetsch

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!
 
M

Mary Fetsch

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top