Is there anyway to code behind that is pushed on a form after data is entered to test if it is a new record?
Is there anyway to code behind that is pushed on a form after data is entered to test if it is a new record?
that is what i thought but it is not working right. here is the whole if..then:
Code:If Me.NewRecord Then DoCmd.OpenForm "Benefits", , , , , acDialog, Me.ID & ";" & Me.First_Name & ";" & Me.Last_Name Else DoCmd.OpenForm "Benefits", , , "[EmployeeID]=" & Me.ID, , acDialog
You're missing the "End If" if that's all the code. If not, what does "not working right" mean exactly?
I just missed that in the copy, it is there. well, if I am on a new record and I click that button it does not pass the openargs.
I am thinking when you click "the button ", the record had grown "old".
( I never work on any new record, so I am not sure if I am right, just a remind)
What event is the code in? The form is bound to a table?
the code is behind a button. and the form is bound to a table
i guess im not sure how to upload it
i Figured it out
The code is a bit messy
It appears you grabbed the lock file (.laccdb) instead of the actual file (.accdb).
indeed i did, but now its not letting me. says im missing a security token