The problem I have is I want to pass into RecordD.Open the value of Postage, which may be "First" for example and not the string "Postage" as it thinks now. Eg:Code:Function Postage_Charge(Postage As String, Country As String) As Currency Set RecordD = New ADODB.Recordset RecordD.Open "SELECT Postage, Country FROM tblPostal", CurrentProject.Connection 'Return Postal charges plus shipping' Postage_Charge = RecordD.Fields(0).Value + RecordD.Fields(1).Value End Function
(both First and UK exist in a table)Code:Something = Postage_Charge("First", "UK");
I have tried $Postage with no luck. Anyone have any suggestions?
Thanks![]()




Reply With Quote