
MS Access [English]
Get flash to fully experience Pearltrees
Calendar
Access Help and How-to - Microsoft Office UtterAccess
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.
Access Tips: Query and Filter Criteria
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!
Export an Access query as an HTML Web Page
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!
Examples of Access VB Code Modules
DATA Pig screen casts

