How to merge data from linked tables Q: Lisa Hartley writes: I’m planning to use the code in code2.zip to merge data from Access into word documents. Could you please give a couple lines of sample code which would tell me how to get data from a related table. In
How to use Rich Text in memo fields in Access 2007. Access Archon #157 Introduction Over the years, the functionality of Access forms and reports has been significantly upgraded. In Access 2007, one long-requested feature has finally arrived in a workable form (I recall an early and unreliable implementation that
How to save a report to PDF file in Access 2007. Access Archon #156 Introduction For many years now, Access users have wanted the option of saving a report to the PDF format. An Access report saved as a PDF file can be opened by anyone (unlike Access snapshots,
How to create a database with links to external documents. Q: I am looking for some information and examples for creating a database of documents….(Excel spreadsheets, PDF files, word documents, jpegs, and bimps). I would like to see an example of records with links to external docs, and perhaps an
How to open a form when making a selection from a listbox on another form. Q: Martin wrote to ask if I could help with code to open a form to a specific record when the user makes a selection from a listbox on another form. A: This is easy
How to update Word fields in documents created from Access Mergee. Q: Richard Lally writes: I am very interested in trying the Mail Merge method you suggest but I am anxious about one thing. The templates include a number of fields that need updating when a document is created from
How to enable Macros in Office 2007. Q: Marge W. writes that a client called her in panic, saying that “nothing works” in the updated database she just delivered. Upon questioning, it turned out that nothing happened when buttons were clicked on the main menu, and that the client had
How to use records selected in a recordset as the record source for the Detail section of a report. Q: Mark Jackson writes to ask if records selected in a recordset can be used as the record source for the Detail section of a report. A: I think the best
How to merge data from a recordset based on a query to Word documents. Access Archon #168 Introduction An AW reader wrote to me asking if the document properties merge code in my Code Sample #24could be modified to merge data to Word from a query, instead of selections
Suiting Access 2007’s Navigation Pane display to your liking. Q: Gordon Rennie writes: “Now with Access 2007 the database window has disappeared and been replaced with a stupid list at the side that only shows one item per line. Is there any way to get the database window back? or
Link to information about hiding the database title bar. Hiding the Database Title Bar Q: Bill Johnston wants to know if there is any way to hide the database title bar. A: I found something on the Web (I haven’t tried it). See Terry Kreft’s post on TheScripts Developer Network
Q: Bradley Wellard writes: “I am still a bit of a novice and have been attempting to find some useful information on how to apply/use ActiveX controls in Access with little success. I am particularly interested in any information regarding the Microsoft ImageCombo Box control V.6. Are you aware of
Q: Sanjay Singal wants to know how to send an attachment generated from Access data in an Outlook email message. A: Access Archon #148 deals with this topic (creating and mailing attachments in an email message). In this sample database, the values of various email message fields are picked up
How to create a file name that includes the date. Q: Steve Mason is trying to export data from a query to an Excel worksheet, and save each exported file with today’s date in the file name, for example qrytest.01/01/2004.xls. How can this be done? A: Slashes in the date
How to recover from an AutoNumber disaster. Access Archon #165 Introduction A standard AutoNumber type field (with its NewValue property set to Increment) should start at 1 (though it is possible to start with a higher number), and each new record should be assigned the next higher number, so
How to delete duplicates from another table. Q: John Haynes writes: I am trying to set up a standard query to delete duplicates. The tables consist of customers from 2 different companies company I and company N. I need to delete the customers in company I when there is a
How to sort reports by date in Access. Access Archon #163 Introduction If you have a report with a date field, you may need to sort the report by date, and Access has a built-in feature that lets you do date sorting very easily, without preparing a query in advance,
How to generate random numbers. Q: Bob wants to know if there is some way to generate random numbers within a certain range (he needs to fill a field in a table with sample values). A: Yes, there is an Rnd function you can use for this purpose. It returns
How to make one cell in a datasheet subform a different color than the others using conditional formatting. Q: Rosie W. writes to ask if there is any way to make one cell in a datasheet subform a different color than the others. This control is locked, and she wants
How to sort Reports by date in Access. Access Archon #163 You might need to group records by date using another interval that is not available in the Group On list. If the interval is regular, you can create a query field, such as the Decade field in qryMembers: Decade:
The phantom breakpoint: what causes it and how to solve the problem. Q: Don R. writes: When I click a command button to print a Word letter (this button runs VBA code to create the letter from a Word template), the code stops on a certain line, which is highlighted
How to show multiple lines of information about listbox items. Access Archon #164 Introduction Listboxes are a convenient way to select one or more items for action, such as creating Word letters or printing a filtered Access report. But sometimes you need to see more than a single line
Access Archon #164 The final (and most complex) procedure is the cmdWordLetters Click event procedure, which creates a new Word document from a hard-coded template for each selected contact; when it is done, the documents are open for inspection. Private Sub cmdWordLetters_Click() On Error GoTo ErrorHandler Dim
A look at the Extras Add-in which combines the functionality of backup and field listing. Access Archon #155 Introduction In previous articles, I described a set of objects you could import into any Access database to do database backup (Access Archon #151) or list tables and queries and their fields