Hi All:
I have a situation where I have a "Click to add" function on a subform that lists records in another table. As the last record in the subform, it's listed as "New" instead of "Edit".
When I click on "New", I have an open form command with a where "[ID]=" & Nz([ID],0) statement.
This works well. The problem is that when the subform opens, and data is entered, I have a command button to start a procedure based on the PK ([ID]). Since no ID exists yet (assigned on save), the function requiring the PK reports no valid PK.
I have attempted to insert an
Code:
if me.dirty then me.dirty=false
but then it replaces the data in the form with #deleted and give me a write conflict error when I attempt to save the record again (close form).
Question:
How do I save the record to assign the PK in [ID] and then pass that value to the functions that require it?
Thanks...