I have reduced my code to a simple function call to exemplify the problem, so here is the example. I only receive the following message:
Visual Basic
Run-time error '13':
Type mismatch
As far as I can tell, there shouldn't be a problem. Any help is appreciated.
Visual Basic
Run-time error '13':
Type mismatch
Code:
[blue]Private Sub[/blue] Form_Load()
[blue]Dim[/blue] AccountRst [blue]As[/blue] ADODB.Recordset
[blue]Set[/blue] AccountRst = [blue]New[/blue] ADODB.Recordset
[green]'Error occurs here[/green]
LoadAccountDetails (AccountRst)
[blue]End Sub[/blue]
[blue]Private Sub[/blue] LoadAccountDetails ([blue]ByRef[/blue] rst [blue]As[/blue] ADODB.Recordset)
[green]'doesn't even have to do anything[/green]
[blue]End Sub[/blue]
As far as I can tell, there shouldn't be a problem. Any help is appreciated.