MS Access [English]
Get flash to fully experience Pearltrees
UtterAccess Wiki Featured Content, 2012-08-28 UtterAccess would like to present a new announcement series for UA Wiki content. Having watched the Wiki grow over a period of time, we will be periodically announcing some articles and code that we've found to be particularly insightful and helpful to our community. Please take a moment to peruse the following short list, the first of many to come, and see how these contributions may be able to improve your experience with Access. As always, many thanks to all of our contributors!
When constructing a query or a filter, you need to tell Access what to look for in each field. You do this by defining criteria - typing something (an "expression") into the Criteria cell of the query or filter grid. If you do not define any criteria for a particular field, Access assumes that you are applying no constraints and will display everything it has. This means that you only have to define criteria for those fields you are interested in. Here are some examples of the more common types of criteria. Often Access will complete the expression so that you need only type the text you want to match.
Sub MakeHTMvacancies() '* Create an HTML page displaying the query: Vacancies Dim MyDB As Database, MySet As Recordset Dim MyFileName As String, MyCurrentGroup As Stringe ' declare variables for running totals of numeric fields Dim Var As Single, Bud As Single, Wkd As Single, Con As Single, Vac As Single DoCmd.Hourglass True Set MyDB = CurrentDb() Set MySet = MyDB.OpenRecordset("vacancies", dbOpenDynaset) MyFileName = "R:\vacancies.htm" Open MyFileName For Output As #1 MySet.MoveFirst MyCurrentGroup = "x" ' on each change of the field MySet!
Sub RunEmailDist() Dim MyDB As Database, MyRecs As Recordset, MyName As String Set MyDB = CurrentDb() Set MyRecs = MyDB.OpenRecordset("emaildist") MyName = InputBox("Enter your name","RunEmailDist (CiM)", "Chris Mead (Extn 3841)") MyRecs.MoveFirst Do While Not MyRecs.EOF If MyRecs!distname = Forms("F_ChooseEmail")!DistNameCombo Then DoCmd.SendObject acSendReport, "Your budget report", acFormatRTF, MyRecs!
DATA Pig screen casts
Home MS Access Tutorials The Fundamentals In this tutorial you will learn about exactly what a database is, what it is used for, and how to perform simple database tasks, such as adding and deleting records.
Prompt For Saving a Record Microsoft Access automatically saves any changes we make to a record, whether we close the form or move to a new record. I will show you a way of prompting a user to save the changes.