Before we consider how to change each type to add an "ALL" option, let me first explain the general principle of what we're going to do. Okay, so we're happy with the four basic types of combo-box row-source as they might appear on a form control. Such a row-source might look something like SELECT RegionID, RegionName FROM tblRegion ORDER BY RegionName The ID field can then be given a column width of zero in the combo-box, allowing the user to see and highlight an intuitive and meaningful text value but to actually be selecting a numeric ID value.
If you use an existing convention, reference it in your application's documentation. document your conventions so that others may follow your work.It's more important to work to a standard - any standard - than to adhere slavishly to a particular standard. even if you define your own, use some sort of standard and stick to it - you'll thank me for this later.Like many developers, I use the subset of these standards that works for me, and I expect you'll do the same.Īnyway, regardless of whether you buy into the Leszynski/Reddick conventions or define your own, here are some general pointers on standards:
#Access 97 how to change default printer code
You'll find the code samples on this site loosely conform to these standards. Wouldn't it be a whole lot easier to adopt a naming convention that enables you to know what something is just from its name? Well, there are numerous naming conventions out there, the most popular of which, from an Access perspective at least, is the Leszynski/Reddick VBA naming conventions, a copy of which can be found in Word format here. Alternatively, think of a form you've created without changing any of the control names - in six months time are you going to be able to easily tell TextBox8 from TextBox9, or ComboBox13 from ComboBox31? Pretty confusing already, isn't it? Now try referring to these items in code, and you'll see what a nightmare naming can be. Why should you bother with standards? Maybe a couple of illsutrations are in order: consider a finance database that has a table called "Account", a query called "Accounts", a form called called "Account" and a report called "Accounts".