RE: Form goes blank if no record in bound query

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi again. Quick update.

To get around the no-records situation I have put some code into the form's
Open event handler to check whether the table is empty and append a record
with some default values if it is. I open the table, use .AddNew, .Fields and
..Update. in a VBA multiline With <tablename> statement. This works, sort of.
That is to say, the first time I open the form, it appears blank, but if I
close it and open it again, everything appears as it should.

How can I avoid this undesirable behaviour?

TIA

Hopeful Kiwi
.



Relevant Pages

  • Re: functions, list, default parameters
    ... print "hey, L is empty" ... print "after append, L = ", L ... The problem many new Python programmers have is to separate the notion of the symbol L and the object. ...
    (comp.lang.python)
  • Re: manipulating linked list
    ... initially empty. ... each ORIG item to L1 and each DUPLICATE item to L2. ... append L2 to L1 and return L1 as the result. ... *l2end = NULL; ...
    (comp.lang.c)
  • Re: Form and Subform record issues
    ... Just empty it with a DELETE query on opening ... the form and append its contents to the ...
    (microsoft.public.access.formscoding)
  • Re: List Performance
    ... So its actually faster to append to a long list than an empty one? ... They overallocate, and the amount of overallocation is dependent on the current size. ... But you can't do it directly from Python, ...
    (comp.lang.python)