I have the following code which works fine. It stores data in Access table using excel/VBA. Now the below code adds listbox values in fields 17 , 18, 19 etc . I want to get it done dynamically so that the code checks the field names and then populate the values. T the moment the code stores listbox values in field number 17 onwards but if more fields get added before 17 field number then the order will get changed the following code .fields(j+17).value will populate values in other fields .
I want the code to check for field names and then populate values. so it will check fields names
Pol1,count1
Pol2,count2
Pol3 count3
;
;
;
So the listbox has 2 columns Policy Number and Total cases. If the listbox has 3 records then the data will get stored in Pol1,Count1,Pol2,Count2,Pol3,Count3.
I hope I made it clear but still any questions do let me know.
Thanks
Bookmarks