ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Printing a database record (https://www.excelbanter.com/excel-discussion-misc-queries/71024-printing-database-record.html)

Fiat-Lux

Printing a database record
 
Hi, I have question regarding an excel spreadsheet.

I have a simple flat-file database that at the moment only contains about a
hundred records but will by the end of the hold at least a thousand.

I would like to be able to somehow highlight a row that contains a record
and export that information perhaps into another worksheet so that it can be
printed like a form.

Any ideas would be appreciated.

Regards
Adrian

bigwheel

Printing a database record
 
Well I think I'd start by designing my form on a new worksheet and make a
note of where the datafields should be. Then you could create a macro which
fills the datafields on the form from information in the database using a
formula similar to this:-

Sheets(2).Cells(10, 7) = ActiveCell

cells(10,7) would be G10 of your form and that would show the data from the
activecell in the database say A2. Next you need the rest of the data, so a
few more lines in the macro for example:-

Sheets(2).Cells(12, 7) = ActiveCell.Offset(0, 1)

Offset(0,1) would be A3 etc. Then change to the worksheet with the form and
print it

"Fiat-Lux" wrote:

Hi, I have question regarding an excel spreadsheet.

I have a simple flat-file database that at the moment only contains about a
hundred records but will by the end of the hold at least a thousand.

I would like to be able to somehow highlight a row that contains a record
and export that information perhaps into another worksheet so that it can be
printed like a form.

Any ideas would be appreciated.

Regards
Adrian



All times are GMT +1. The time now is 02:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com