Interesting problem, why not try
Code:
Private sub boolValidReturnDate(testDate as date) as boolean
Dim iDay as integer
IDay = weekday(testDate, vbMonday)
boolValidReturnDate = true
If iDay = 6 then boolValidReturnDate = false
If iDay = 7 then boolValidReturnDate = false
If not isnull( dlookup("testdate", "otherTable") ) then
boolValidReturnDate = false
End if
End sub
Private function dateReturn(dateLoan as date) as date
Dim i as integer, dateFortnight as date
i=0
DateFortnight = dateadd("d", 14, dateLoan)
Do while not boolValidReturnDate( dateAdd("d", I, dateFortnight) )
I = i + 1
Loop
boolValidReturnDate = dateAdd("d", i, dateFortnight)
End function
Sorry if that doesn't work, I'm on my phone ..