TanyaSealey
Programmer
I've created a form which contains a subform of payments, a list box of unpaid invoices, and a list box of invoices allocated to payments in the subform.
I want to update the allocated invoices list box using the On Current Event in the subform. The list box is based on a SQL user-defined function with the argument PaymentID. At the moment the following code is in the subform:
However the results do not appear in the list box - normally the first record appears but no other. However if I scroll down the rest of the records appear, or I can click on an empty space within the list box and select an 'invisible' record - I can even access the values via code. It therefore appears that my code works but the list box isn't showing the records properly.
I hope this makes sense. Has anyone else encounter and resolved a similar problem?
I want to update the allocated invoices list box using the On Current Event in the subform. The list box is based on a SQL user-defined function with the argument PaymentID. At the moment the following code is in the subform:
Code:
Forms!frmPaymentDetails!lstAllocated.RowSource = "SELECT * FROM dbo.udfAllocatedInvoices(" & Me.txtPaymentID & ")"
Forms!frmPaymentDetails!lstAllocated.Requery
However the results do not appear in the list box - normally the first record appears but no other. However if I scroll down the rest of the records appear, or I can click on an empty space within the list box and select an 'invisible' record - I can even access the values via code. It therefore appears that my code works but the list box isn't showing the records properly.
I hope this makes sense. Has anyone else encounter and resolved a similar problem?