M
muyBN
(Using Word 2003)
I have 20 records in a database and the ID of the 20th record is 24.
Whenever I attempt to extract the ID# of the last record, it only shows the
count (in other words, returns 20 instead of 24), using this code:
jbID = ActiveDocument.MailMerge.DataSource.DataFields("jbID").Value
If someone can show me an example of what should go before this so as to
return the value of the last record, I'd appreciate it. I've tried different
things with recordsets and EOF but I keep getting errors, even after setting
up all the references for ADO and DAO. I'm connecting to the database since
it's returning the record count, but I can't seem to pull up the actual value
of the ID field in the last record.
Many thanks in advance for your help.
I have 20 records in a database and the ID of the 20th record is 24.
Whenever I attempt to extract the ID# of the last record, it only shows the
count (in other words, returns 20 instead of 24), using this code:
jbID = ActiveDocument.MailMerge.DataSource.DataFields("jbID").Value
If someone can show me an example of what should go before this so as to
return the value of the last record, I'd appreciate it. I've tried different
things with recordsets and EOF but I keep getting errors, even after setting
up all the references for ADO and DAO. I'm connecting to the database since
it's returning the record count, but I can't seem to pull up the actual value
of the ID field in the last record.
Many thanks in advance for your help.