How To Use The New Multivalue Field In Access 2007/2010 Sunday, June 19th, 2011

Database Developer | How To Use The New Multivalue Field In Access 2007/2010
Database Developer | How To Use The New Multivalue Field In Access 2007/2010
Sunday, June 19th, 2011

Access 2007 has a new feature–it can store multiple values in one field. That capability is a bit confusing, since storing multiple values in a field violates normalization (which allows only one value per field).

Multivalued fields allow users to select and store more than one value, or choice , in response to the same question or control.

For instance, if several employees are working on the same project, you can store all of their names in the same field. In truth, the user making the choice really won’t notice the difference–only the creator will know about the table-level attribute. The database developer won’t have to work as hard when designing and creating tables.

Because such a field violates normalization rules, you might ignore it. The fact is, Access doesn’t store the values in a single field. To you, it might look that way, but under the hood, Access stores the data in normalized, but hidden, tables–Access is handling normalization for you, by separating and storing the data and then pulling it all together in the user interface. Technically, the multivalue field is actually a many-to-many relationship, but you don’t have to do any of the work to create it and you won’t actually see that relationship at work.

Developers that have been using Access for years are probably a bit leery of the multivalue field. They might refuse to use it and that’s okay. Here are a few guidelines to help you make that decision for yourself:

Don’t try to use this feature with long lists.

Use multivalue fields if you’re using SharePoint Services.

SQL Server converts a multivalue field to a Memo field, so keep upgrading in mind when making your choice.

Once you decide to use a multivalue field, creating it is simple, as a wizard does most of the work:

I didn’t offer specific step-by-step instructions for completing the wizard because it’s easy–you really won’t need my help. But, if you do end up needing some assistance, you can find detailed instructions for using the wizard online at Guide to multivalued fields .


The only thing simpler than creating a multivalue field is using it! Honestly, you don’t have to do a thing, unless you want to. I used the Form Wizard to create the form below–Access did all the work creating that combo box. I didn’t have to do a thing. To use the control, just check the values that apply.

If you open an mdb format database in Access 2007 or 2010, this feature will create a lookup field, not a multivalue field. Be sure to convert the mdb database to the accdb format first. Then, this feature will create a multivalue field. To convert the mdb file, click the File tab, choose Save Publish, and select Access Database (*.accdb), and click Save As. Click Save and then OK to confirm the conversion.

If you practice good spreadsheet design, formulas shouldn’t be hard to find. That’s a nice thought, but it’s not terribly practical. You might be working in a legacy workbook that you didn’t design or perhaps the sheet contains a lot of data. Fortunately, there are two quick ways to find formula cells: [F5] and VBA.

Using [F5]

Pressing [F5] is the easiest way to identify formula cells. Doing so actually selects the cells, so it’s temporary. To use this method, do the following:

Using VBA

Using the Special option works, but it’s temporary–it’s a quick way to get a quick look. If you want to identify formula cells in a permanent way, you’ll need to do so manually, or you can use VBA. For example, add the following function to a module and run it as a macro to apply a yellow highlight to formula cells:

You can call a similar function from a conditional format. This method is probably more appropriate if you want to offer users a method they can apply themselves. In this case, add the following function to a module:

Then, show the user how to call the function from conditional formatting as follows (in Excel 2007 and 2010):

In Excel 2003, do the following:

When showing users how to apply this conditional format, make sure that you emphasize that they must enter the first cell in the selected range, as in =IdentifyFormulaCellsUsingCF( B3 ). If they enter the wrong cell reference, Excel won’t highlight the right cells.

Users will have no trouble applying formats in a familiar way using this method. (They probably won’t have the VBA expertise to update the original macro code.)The rule applies yellow highlighting just to formula cells within the selected range. This is another advantage for this method–you can control the range in which you identify formula cells.

In addition, this method is dynamic. If you add a formula cell to the selected range, the conditional format will automatically kick in and highlight the cell. The original macro can’t do that for you–you’ll have to execute it each time you want to identify new formula cells.

Word’s new Quick Gallery (in Word 2007 and 2010) provides a one-click method for applying a style but only a few styles are available. The Quick Style Gallery displays the first few Styles (listed in the Styles pane). If the styles you use the most are at the bottom of the list, they’re not visible in the ribbon group and therefore, not available with just a quick click.

Fortunately, you’re not stuck with the default arrangement; you can move your most-used styles to the top of the list and into the Quick Gallery as follows:

If the style doesn’t show up, display the Styles pane, select the style, and choose Add To Quick Gallery. Once you move a style to the top of the list, you can select text and click the style in the Quick Gallery–a quick one-click solution to assigning styles.

Susan Sales Harkins is an IT consultant, specializing in desktop solutions. Previously, she was editor in chief for The Cobb Group, the world’s largest publisher of technical journals.


posted on 2011-10-07 10:35  lexus 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/lexus/archive/2011/10/07/2200408.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值