If Null, Then Add....

S

ServiceEnvoy

I want to be able to double click on a combo box I have. If it is
filled, I want it to load the other form and filter to the record that
matches the unique id in the combo box. If it is null, I want it to
open the other form in add mode. This is the code i currently have.
It looks good but it will not save the new record when created. What
is wrong with the code?

Private Sub ServicerID_DblClick(Cancel As Integer)
If IsNull(Me.ServicerID) Then
DoCmd.OpenForm "servicersAll", , , , acFormAdd
Else
DoCmd.OpenForm "servicersAll", , , "[ID] = " & Me.[ServicerID] & ""
End If
End Sub
 

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