How to filter a table-type recordset. Q: Mark Jackson writes: “Does anyone have a very complete example of how to open a table type recordset based on a table in the same database? I can’t seem to find what I am missing in my code. I was able to get
An easy-to-use form that applies either one or two filters to data on a form. Introduction In Access Archon #129(Fancy Filters), I described a form that allowed you to filter data using seven filters and two sorts. Some readers found the complexity of this form overwhelming, so in response to
Some helpful insights about the future of DAO, and what it means for you. For several years now, there have been rumors that DAO would be dropped, so that in future only ADO could be used to work with Access data. While doing research for my new book, I even
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
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 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 change multiple object icons to just one Access icon that represents the database. Q: Sally Q. writes: “I am using Access 2002/Windows 2000, and instead of a single Access icon on the taskbar, I see several different icons, apparently representing every open object in the database. This is
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 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 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,
A reader suggests an alternative method to referencing a subform control. Q: Bob Massey writes to comment on my answer to Noni Nabong’s question in AW 9.03, where I gave the syntax for referencing a subform control. He suggests an alternate method, as follows: I have mostly (99% of the
How to create a simple Add-to Combo Box. Access archon #161 Introduction Back when my Access Archon column appeared in Office Watch (around 1998), and there were no code samples, in Access Archon #7 and #8 I described how to create add-to combo boxes that let users enter new
At the end of Access Archon #159 (in AW 9.06), I noted that in some cases, multi-valued fields can replace complex code for add-to combo boxes. As it turns out, I have to take that statement back – I was relying on a feature that was pulled from Access 2007
How to have a form open to the last record. Q: Manjit Lota writes to ask how he can have a form open to the last record. A: There are several ways you can do this. If you want to use the form for data entry, change the form’s DataEntry
How to create an Add-to Combo Box with a Data Entry Form. Access Archon #161 Creating an Add-to Combo Box with a Data Entry Form If you want to add new entries to a table that has more than one or two fields, a different technique is needed: opening up
How to get Access add-ins to work in Access 2007 running on Windows Vista. Access Archon # 162 Introduction I have add-ins that were originally developed in Access 97 that have worked in all versions up through 2003, and others that had features new to Access 2000 or Access
How to filter a form from a listbox selection. Q: Martin later wrote with a related question: he is getting Runtime error ’13’: Type mismatch when running the following code (which is intended to filter the current form by the double-clicked item in the listbox): Private Sub lstSamtaler_DblClick(Cancel As Integer)
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
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