Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.
(SELECT TOP 1 [Payment Receipts].[Receipt Number] FROM [Payment Receipts] WHERE [Renter Space Assignments].[Space Number] = Forms![Rental Property Management]![Payment Receipts_Space Number] ORDER BY [Payment Receipts].[Receipt Number] DESC) Private Sub Payment_Receipts_Space_Number_AfterUpdate() Dim RecVar As Variant Dim MatchVar As Variant Dim TableVar As Variant MatchVar = Me![Payment Receipts_Space Number] TableVar = [Renter Space Assignments].[Space Number] RecVar = DLookup("[Receipt Number]", "Payment Receipts", "'" & TableVar & " = " & "'" & MatchVar & "'") Me![Receipt Number].SetFocus DoCmd.FindRecord (RecVar), acAnywhere, False, acSearchAll, False, acCurrent, True End Sub