Run-time error '2448': you cant assign a value to this object
Posted on 2005-03-10
Hi, I have a list box where the user selects a record to be opened by double clicking the record, or selecting said record and clicking the open record button. However if the user clicks open record button before a record is selected then I get...
Run-time error '2448':
you cant assign a value to this object.
the code highlighted is:
Private Sub Form_Open(Cancel As Integer)
If Len(Nz(Me.OpenArgs)) > 0 Then
Me.Filter = Me.OpenArgs 'this line is highlighted in debug
Me.FilterOn = True
this code is in the main form where the selected record would be displayed.
I want to be able to catch this error and output my own msg ie. "you must select a record before opening"