troubleshooting Question

Access 2016 Form Before Update Creates Blank Record

Avatar of Bob Collison
Bob CollisonFlag for Canada asked on
Microsoft Access
3 Comments1 Solution24 ViewsLast Modified:
Hi Experts,

I'm having weird problem.

I have a Form bound to a table with a Primary Key whos properties include:
- Required: Yes
- Allow Zero length: Yes.
- Indexed: Yes (no Duplicates.

There are two records in the table.

The Form Before Update code checks the to see if the Primary Key [EVENT_FI_TRAN_ACCT_KEY] and if it is Null does an 'Undo' and Exit Sub.  See code below.

If Me.EVENT_FI_TRAN_ACCT_KEY & DblDblQuote & DblDblQuote = DblDblQuote & DblDblQuote Then
   'Empty Form.  No update.
   Me.F46010EventFITranRecMode = "E"   'Transaction Record Mode: E=Empty.  i.e. No Add or Update.
   Me.Undo         'Reset Form. Won't update data. Stay on same record.
   Exit Sub
Else
   Me.F46010EventFITranRecMode = "U"   'Transaction Record Mode: U=Undetermined.
   GoTo STEP_120   'Step 120-Check If Event Finance Transaction Account Key Has Changed.
End If

When I scroll past the second record record an empty record is created in the table and I can no longer navigate either forward or backward.

There is no error produced.

I suspect that the 'freeze' issue is caused by the blank record.

How can I ensure that the blank record is not created?

Thanks,
Bob C.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros