I have a report with an unbound text field named txtCtyName.
My vba code loops through an array and exports a report.
I want to write the code so that before it exports the report, it fills in txtCtyName, with the value of the array item.
The items in the array = x
I want to do something like this, but am not sure how to write the part that is in Red.
Thanks for any help or direction on thisCode:'if the array item x = 02 then If x = "02" Then 'open the report DoCmd.OpenReport "Report_65" 'Insert x (or '02') into the txtCtyName field on the report txtCtyName = x 'Close report....and then I would go on to export it.... DoCmd.Close MsgBox "check it now" End If