P
padmajakrishnan
I have a form (form1) that has a list box called "Code" (sorted
ascending) and its details from a table. Clicking "New" button on this
form1 opens Form2. After entering the Code and its details, I save this
records. The new record is added to the table and the list box is
refreshed to reflect the new record. When it refreshes, it sorts the
values in ascending. Form2 closes and we are back in Form1.
Now, I want the default selection in the List Box to be the new record
that we added. I wouldn't know the Item index because the data is
sorted and the new value could be anywhere in the list box.
In the Save click event of Form2, I tried using:
Forms!Form1!Code.DefaultValue=new code
But it didn't work. How do I set the default to the new record?
Thanks a lot in advance!
ascending) and its details from a table. Clicking "New" button on this
form1 opens Form2. After entering the Code and its details, I save this
records. The new record is added to the table and the list box is
refreshed to reflect the new record. When it refreshes, it sorts the
values in ascending. Form2 closes and we are back in Form1.
Now, I want the default selection in the List Box to be the new record
that we added. I wouldn't know the Item index because the data is
sorted and the new value could be anywhere in the list box.
In the Save click event of Form2, I tried using:
Forms!Form1!Code.DefaultValue=new code
But it didn't work. How do I set the default to the new record?
Thanks a lot in advance!