RaunLGoode
Registered User.
- Local time
- Today, 09:15
- Joined
- Feb 18, 2004
- Messages
- 122
I am importing Data from an Excel spreadsheet into Access
As each record is processed, It is assigned a Primary Key value, which becomes the document # for each record this field is called DocNum.
I would like to copy the Access number back into the Excel document. I think the best way to do this will be to save the Primary Key Value as a variable. Then I can return to Excel, Assign the value of the variable to the proper cell on the spread sheet, and loop to the next record.
I have been unable to write a command to assing the Primary Key Value to the variable.
I declare the Variable
[ Dim dblRecNum AS Double] (lots of records)
and then I have tried assign the Current DocNum Value to dblRecNum using various versions of the command:
[dblRecNum = DocNum.Value]
None of these have worked. Could somebody tell me what the proper syntax is to assign the value of a new record (or any record) to a variable?
As each record is processed, It is assigned a Primary Key value, which becomes the document # for each record this field is called DocNum.
I would like to copy the Access number back into the Excel document. I think the best way to do this will be to save the Primary Key Value as a variable. Then I can return to Excel, Assign the value of the variable to the proper cell on the spread sheet, and loop to the next record.
I have been unable to write a command to assing the Primary Key Value to the variable.
I declare the Variable
[ Dim dblRecNum AS Double] (lots of records)
and then I have tried assign the Current DocNum Value to dblRecNum using various versions of the command:
[dblRecNum = DocNum.Value]
None of these have worked. Could somebody tell me what the proper syntax is to assign the value of a new record (or any record) to a variable?