PDA

View Full Version : Format Access Print Output



skylarpurifo
12-30-2013, 10:52 AM
Hello,

I have created a database and now i have created a form with a few different buttons. However i need to create a button that will print all the records within the database but my boss wants it to look a certain way. Not the standard way access prints out your records. In my case he wants it to print out every record in this format:
- <directory>
-<item_list>
- <item>
<ln> jones <ln>
<fn> bob <fn>
<ct> 18156247890 <ct>
<sd> 1 <sd>
</item>
Where ln = last name, fn = first name, ct = contact, and sd = speed dial. However not every record has a speed dial and he wants me to print out every record (155) in this format. He suggested i use a loop statement and I know i should but I do not have any experience with VBA code and I do not know how I would have the button on my form print off the records in this way. I know how to print all records but how do I do it so that it prints in this manner?

Any help would be greatly appreciated,
Thanks.

SamT
12-30-2013, 11:00 AM
skylarpurifo,

Welcome to VBAExpress. I am changing the title of the thread to attract more experts. Using a meaningful title also lets our other users find the threads that address their problems.

HiTechCoach
01-19-2014, 02:43 PM
This is not abouet printng but creating an XML style file.

This is a cross post from Printing format in MS Access 2010 (http://www.mrexcel.com/forum/microsoft-access/747538-printing-format-ms-access-2010-a.html)

See the above for sample code that will get you started with writing the VBA code.

As previously pointed out, you will need to write VBA code to create the format. What you are posting is not valid standards XML. The closing tags are the same as the opening tag.