Re: Power Objects questions

From: Michael Kranzdorf <mikek_at_krt.com>
Date: 1995/09/01
Message-ID: <mikek-0109951127130001_at_franklin-tty11.jvnc.net>#1/1


In article <426n9m$55q_at_nntp.interaccess.com>, Rick Greenwald <greenie_at_interaccess.com> wrote:

> >2) I am trying to update a listbox in a button Click() event (following
> >the example in the help page for UpdateList()). However I get the message
> > BAS-01010 - Object value required
> >for the InsertRow() method. I can see no obvious spelling errors (I even
> >got another pair of eyes to look at it). What does this message mean?
>
> If you are using the exact code from the help screen, you will be getting
> an error because there is in error in the code.
>
> Rather than using lstCust.GetRecordset.InsertRow()
> try
> lstCust.GetRecordset().InsertRow()

This is not an error. Parenthesis are optional when there are no arguments. The code works fine (you can even pull the parens off the insertrow).

The problem is that there is probably not a recordset yet. If you call getrecordset() on a list box with no contents, NULL is returned. (This is probably a bug, it should create an empty set.) Try putting something like 1=1 in the translation property of the list box and see if that fixes it. (If you want to start with an empty list, maybe try putting a space in the translation property and deleting it after the first insertion.) Note that it could also be that the list is bound to an empty table - same problem, different solution (left to the reader). Be sure to check the datatypes on the list and the items you're inserting.

As to Debbie's question 1, I dunno, but it happens to me very rarely (I'm on a Quadra). Regards,

Michael Kranzdorf                      ---           mikek_at_krt.com
Director of Information Systems        ---                NYSE:KRT
Kranzco Realty Trust                   ---            610.941.9292
Received on Fri Sep 01 1995 - 00:00:00 CEST

Original text of this message