Hello again all! I am still working on the same project (but I have made lots of progress! Still trying to close uidoc w/o save prompt though!) So here's my next problem. I have 5 similar fields (prioraddress_1, priorcity_1, etc.) I am trying to write a for loop that will append the "number" to the end of the fieldname and set the value of a document. I have searched and found the documentation for concatenation, but IT DOESN'T WORK!!! I have tried using just one for loop, and two with different counter variables, and still can't figure this out. I get Illegal use of PROPERY when I try to run this. I have also tried the &, but the code turns red!
Here's my code, if any suggestions, would really appreciate it!
a = 1
For a = 1 To 5
docb.PriorAddress_+a = tempdoc.PriorAddress_+a
docb.PriorAddressApt_+a = tempdoc.PriorAddressApt_+a
docb.PriorAddressCity_+a = tempdoc.PriorAddressCity_+a
docb.PriorAddressState_+a = tempdoc.PriorAddressState_+a
docb.PriorAddressZip_+a = tempdoc.PriorAddressZip_+a
docb.AtPriorAddressYr+a = tempdoc.AtPriorAddressYr_+a
docb.AtPriorAddressMo+a = tempdoc.AtPriorAddressMo_+a
a = a + 1
Next
Here's my code, if any suggestions, would really appreciate it!
a = 1
For a = 1 To 5
docb.PriorAddress_+a = tempdoc.PriorAddress_+a
docb.PriorAddressApt_+a = tempdoc.PriorAddressApt_+a
docb.PriorAddressCity_+a = tempdoc.PriorAddressCity_+a
docb.PriorAddressState_+a = tempdoc.PriorAddressState_+a
docb.PriorAddressZip_+a = tempdoc.PriorAddressZip_+a
docb.AtPriorAddressYr+a = tempdoc.AtPriorAddressYr_+a
docb.AtPriorAddressMo+a = tempdoc.AtPriorAddressMo_+a
a = a + 1
Next