View Full Version : OnCurrent Code Change Report No


quest4
07-21-2008, 08:52 AM
Good afternoon, I have a form with a PKey that is assigned by a module, which replaces the Access Autonumber procedure. It works good for new numbers but when i recall a existing Report no, it changes the report no to a new report number. This is be caused by the OnCurrent event and I was wondering if there is a way to say if record exits, End Sub? Thank you in advance for any help.:confused:

pbaldy
07-21-2008, 09:06 AM
You can either test to see if the field is empty:

If IsNull(Me.ControlName) Then

or test the form:

If Me.NewRecord Then

quest4
07-21-2008, 10:03 AM
Thanks for the response Paul, that did the trick and now it is flying right.