David McAfee
davidmcafee at gmail.com
Mon Aug 17 16:30:41 CDT 2009
hmmmm. Just noticed the stupid listbox is acting up again! I completely recreated the form, new controls (no copying/pasting). Now its only showing the top three list items. This doesnt happen on any other form. The only thing different about this form than all of the others is that I am using a subform in datasheet view. All other screens have a listbox to select records. The OnCurrent event of the subform does a few things, one of them is: Me.Parent("lstHistory").RowSource = "EXEC stpGetHistMach " & Nz(Me.MachineID, 0) Once again, the returned record count is correct, but the listbox does not display all rows. But the data in the Listbox is there! I can type the following in the immediate VBA window: ? forms!frmRentalMachines6!lstHistory.listcount and get 11 (but only 3 rows show on the screen) I can get data from the listbox: ? forms!frmRentalMachines6!lstHistory.column(1,4) and the correct data shows. now this is the weird part. I can type the following into the immediate window: forms!frmRentalMachines6!lstHistory.requery and all rows display. But if I put a command to requery on the onCurrent of the subform, it switches back to only 3 rows. I can even make a new command button on the parent form and in the onclick event put something like: me.lstHistory.Requery and it doesnt work the same as forms!frmRentalMachines6!lstHistory.requery Going nuts over here! D On Fri, Jul 31, 2009 at 1:37 AM, Max Wanadoo <max.wanadoo at gmail.com> wrote: > Well done - way to go man!! > > Max > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee > Sent: 31 July 2009 00:57 > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Has anyone ever sen a listbox not display all rows? > > I took this bit of advice, deleted the tab control, and all listboxes. > > Built a new list box and using buttons, changed the listbox rowsource and > it > seems to be working. > > David > > On Thu, Jul 30, 2009 at 10:06 AM, Max Wanadoo <max.wanadoo at gmail.com> > wrote: > > > Hmm difficult David, without seeing it. > > What I tend to do is to have the tabs replaced with buttons (make them > look > > similar) and in the main form I have ONE sub form. > > > > Depending which button they click, the embedded sub form name is changed > > and > > it is then requeried. Effectively this means (for 5 tab items, 5 > > same-sized > > sub forms) but each one is only loaded when required (JIT). This also > > reduces the load time for a form with many tabs with many associated > > populating of controls on them. > > > > Max > > > > > > > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee > > Sent: 30 July 2009 17:59 > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Has anyone ever sen a listbox not display all > rows? > > > > I have. > > > > I've even completely rebuilt it. I think it may be the form that is some > > how > > corrupt. > > > > I remember reading somewhere that a form can only have 255 controls, even > > if > > its over time (deleting controls, adding controls, deleting controls). > > I have redesigned this form for a department that didnt know what it was > > that they want five times. > > > > I'm wondering if this somehow could be an issue. > > > > I may have to rebuild the whole form...which sucks because it is very > > complex. :( > > > > David > > > > > > On Thu, Jul 30, 2009 at 1:50 AM, Max Wanadoo <max.wanadoo at gmail.com> > > wrote: > > > > > David, > > > Try COPYING a list box that works and then change the attributes to > what > > > you > > > need. > > > That sometimes works. > > > > > > Max > > > > > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >