I wrote a VB program to load data from a Word file with many tables into Access. The Word tables are all form fields, some of which are drop-downs with several choices. The load is working except for one problem. I created buttons on the protected form to allow users to add or delete rows as there is no way for me to know exactly how many rows each user will need.
I can get the data no problem when I know the fieldname:
rst![cust] = doc.FormFields("cust").Result
However, how can I get the result of a drop-down in a row that has been added since I won't know the name of the field that's generated? Is there any way to say something like this:
rst![choice] = doc.FormFields(currentcell).Result?
I am using MoveLeft, MoveRight, etc. to get in the correct cell. Without using the formfield(fieldname).result logic, I get garbage data loaded in the field, rather than the selection made by the user.
I hope this makes sense. I have checked books and did a search on this site. Any help will be appreciated.
Thanks,
Alexis
I can get the data no problem when I know the fieldname:
rst![cust] = doc.FormFields("cust").Result
However, how can I get the result of a drop-down in a row that has been added since I won't know the name of the field that's generated? Is there any way to say something like this:
rst![choice] = doc.FormFields(currentcell).Result?
I am using MoveLeft, MoveRight, etc. to get in the correct cell. Without using the formfield(fieldname).result logic, I get garbage data loaded in the field, rather than the selection made by the user.
I hope this makes sense. I have checked books and did a search on this site. Any help will be appreciated.
Thanks,
Alexis