Information générale
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Titre:
Passing a ADODB.Recordset Field to a function.
Is it possible to pass an ADODB.Recordset Field to a function?
Here is what I tried and I am getting a "Compile error: - ByRef argument type mismatch" error. I tried passing the "adoField" in by ref and get the same error.
Dim MyRS As New ADODB.Recordset
Set MyRS = New ADODB.Recordset
... processing logic to put values into the "PolicyNo" field along with others...
Set MyString = WF(MyRS("PolicyNo"))
Private Function WF(adoField As ADODB.Field, TotalWidth As Integer) As String
If adoField.Type = adNumeric Then
WF = PadNumeric(adoField, TotalWidth)
Else
WF = PadSpaces(adoField, TotalWidth)
End If
End Function
Thanking you in advance for your help.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement