[AccessD] Setting Combobox to Last Item

David Emerson newsgrps at dalyn.co.nz
Mon Aug 13 21:38:36 CDT 2007


I want to open a form and set a combo box to the last item in the 
list (the list is based on a table so the last item isn't static).

On the Form open event I have:

     intFinModelCount = (basRunDataObject("SELECT FinModelID FROM 
dbo.tblFinModel", adCmdText).RecordCount) - 1
     If intFinModelCount > 0 Then
         Me!cboFinModelDate = 
[Forms]![frmFinModel]![cboFinModelDate].[ItemData](intFinModelCount) 
'Error here
     End If

The error I get is 450 - Wrong number of arguments or invalid 
property assignment.

Any pointers on where I might be wrong?

Regards

David Emerson
Dalyn Software Ltd
Wellington, New Zealand 




More information about the AccessD mailing list