Connecting to a database- next field button problem





I really need help. I'm creating a template where the "First Name" and "Last Name" fields automatically populates when the user clicks a "connect" button. This button will then connect to their local database. I haven't been able to find a solution on how to do this. Does anyone know how to do this? Is there a way that a user can set up their own ODBC and then the pdf will connect to that database?

I've tried using a dummy database and connecting that to the form and the first textfield works. However, I created a "Next record" button and I can't make this work to go to the next record.I'm using a MS access database.

I tried this formcalc stmt but it doesn't work: xfa.sourceSet.{dataconnectionname}.next()

Can anyone help me?

Or know how I accomplish this?

Any help would be greatly appreciated. Thanks