Hi I need help to clean up my module usage and to use it to bring up a deafult value for a field.
My Module that works fine when used as code in a form
this is how I use it in a form and it works fine
How do I utilise it as a Default Value function for a field on a form.
Thanks
My Module that works fine when used as code in a form
Code:
Public Function mgmtRateCheck(StartDate, ConfirmRate)
Dim Rate1 As Double
Dim DMonth As String
DMonth = month(StartDate) & "/" & Day(StartDate) & "/" & Year(StartDate)
Rate1 = 0
Rate1 = DLookup("mgmtRate", "tblmgmtRate", _
"RateDateStart <= #" & DMonth & "#" & " And RateDateEnd >= #" & DMonth & "#")
ConfirmRate = Rate1
End Function
Code:
Call mgmtRateCheck(Date, ConfirmmgmtRate) Me.mgmtFee = ConfirmmgmtRate
Thanks
Comment