Skip to content
Advertisement

Export one field from access to specific cell in excel

I want to place a name from a table/query to a specific cell from access. I have a check sheet with lots of data in other cells that at the top has the persons name at the top. I would like a button that can be clicked that will open THAT file and insert the desired name into it via VBA. I’m aware on how to do this with VBA to a word doc with bookmarks, but now sure how to define the ‘bookmark’ for a cell in excel.

This is what I have so far.

It works, but the query I have returns TWO fields, Fullname and the position, I need to only have the FullName in the excel cell.

Advertisement

Answer

You can use

to pull the value from a record. The recordset starts at position 0. If you wanted the second column, you would use rsquerytest(1).Value.

source

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement