I have the following code - but the calculation is coming out to be 0
rather than the percentage.
Any ideas?
Thanks
Function GetAdoptionRate() As Integer
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSQL As String
Dim datStart, datEnd, d1 As Date
Dim intTelemedReceives As Integer
Dim intMUApps As Integer
Dim intAdoptionRate As Double
Set db = CurrentDb()
Set rs = db.OpenRecordset("SELECT * FROM qryTelemedReceives",
dbOpenDynaset)
With rs
.MoveFirst
intTelemedReceives = rs("CountOfPolicyNumber")
End With
Set rs = db.OpenRecordset("SELECT * FROM
qryMedicallyUnderwrittenReceives", dbOpenDynaset)
With rs
.MoveFirst
intMUApps = rs("CountOfPolicyNumber")
End With
Debug.Print Format(intTelemedReceives \ intMUApps, "Percent") <-------
returns 0
Set db = Nothing
Set rs = Nothing
End Function
FYI intMUApps = 24,000 and intTelemedReceives = 4,000
TIA