Sydcomebak
Registered User.
- Local time
- Today, 16:39
- Joined
- Apr 14, 2008
- Messages
- 46
Hey gurus!
This works only if a record exists in the Contracts table where the Listing_ID equals the ID of a record in the Listings table:
I Googled and saw that somoene on this board knew of a solution, so I tried modifying like this:
I've never used the "Len(" before. Where am I going wrong?
Thanks, everyone!
-Dave
This works only if a record exists in the Contracts table where the Listing_ID equals the ID of a record in the Listings table:
Code:
Private Sub Command44_Click()
Dim sWHERE As String
sWHERE = "Contracts.Listing_ID = " &[Listings.ID].Value
DoCmd.OpenForm "Contract_Info", acNormal, , sWHERE
DoCmd.Close acForm, "Commissions", acSavePrompt
End Sub
I Googled and saw that somoene on this board knew of a solution, so I tried modifying like this:
Code:
Private Sub Command44_Click()
Dim sWHERE As String
sWHERE = "Contracts.Listing_ID = " &[Listings.ID].Value
If Len(Me.[ID] & "") = 0 Then
DoCmd.OpenForm "Contract_Info", , , , acFormAdd
Else
DoCmd.OpenForm "Contract_Info", acNormal, , sWHERE
End If
DoCmd.Close acForm, "Commissions", acSavePrompt
End Sub
I've never used the "Len(" before. Where am I going wrong?
Thanks, everyone!
-Dave