Built-In Excel Data Form Tips and Quirks

Excel Data Form

Someone emailed me last week about problems with a range named Database. For reasons known only to the hamsters that operate my brain wheels, that reminded me of Excel’s Data Form.

It’s a built-in data entry tool, that lists all the fields in a table, with entry boxes for some fields, and the formula results showing. You can scroll through the records, or find specific records, based on criteria.

Built-In Excel Data Form
Built-In Excel Data Form

It’s not a feature that I use too often, and when I looked for the Data Form command in the Excel 2007 Ribbon, it was missing! It looks like I’m not the only one who doesn’t use the Excel Data Form too often.

Access the Excel Data Form

Even though the Data Form command is missing from the Excel 2007 Ribbon, you can still use it. A quick way to open the Data Form is the keyboard shortcut:

  • Press Alt + D, then type O

If you use the Data Form frequently, you can add its icon to the Quick Access Toolbar (QAT). There are instructions here for customizing the Excel QAT. You’ll find the Form command in the “Commands Not in the Ribbon” category.

qatcustomizeform

Open the Excel Data Form

To open the Data Form, select a cell in a table on the worksheet, then use the keyboard shortcut (Alt + D, O) or the icon on the QAT. It doesn’t matter which cell in the table is selected — the Data Form opens at the first record.

DataForm02

Use the Excel Data Form

To open the Data Form, select a cell in a table on the worksheet, then use the keyboard shortcut (Alt + D, O) or the icon on the QAT. It doesn’t matter which cell in the table is selected — the Data Form opens at the first record.

  • To add a new record, click New, and enter the data
  • To scroll through the records, use the Up arrow and Down arrow keys, or use the scroll bar on the Data Form.
  • To edit a record, scroll to that record, and change the data in the entry boxes. While editing a record, you can click the Restore button, to restore the current values. To complete the edit, click Close, or move to the next record (scroll bar or arrow keys).
  • To delete a record, scroll to that record, then click the Delete button
  • To find a specific records, or the first record that meets your criteria, click the Criteria button, and enter the criteria, then click Find Prev or Find Next.

DataForm07

Data Form Quirks and Mysteries

Here are a few things about the database that might surprise you. If you know of any other quirks, please share them in the comments below.

  • If there is a range named Database on the worksheet, it will open in the Data Form, even you have selected a cell in a different table. Ah, that’s what reminded me of Data Forms, when I got the Database question.

DataForm06

  • The width of the boxes in the Data Form is connected to the widest column in the underlying table. If you widen that column, the Data Form will adjust automatically.

DataForm03

  • If numeric columns are too narrow, and some cells show number signs, those number signs are shown in the Data Form, even if its data entry boxes are wide enough to show the number. And unlike the worksheet, where you can point to a cell with number signs, and see a popup with the value, there’s no such feature in the Data Form.

DataForm05

  • But even the number sign quirk has a quirk! Sometimes the numbers are shown in the Data Form, even if the numbers signs show on the worksheet. In the screen shot below, the Cost column is slightly wider, and now the numbers can be seen in the Data Form.

DataForm09

  • Data Validation lists, and other data validation settings, are ignored. For example, there’s a drop down list in the Product column on the worksheet, but not in the Data Form. You can type any value in the Product cell, despite the restrictions on the worksheet.

DataForm04

  • After editing a record, if you click Find Prev or Find Next, the changes are not saved.

Enhanced Data Form

If you like the built-in Excel Data Form, you’ll like John Walkenbach’s Enhanced Data Form even better. It’s a free download for the full version (either Excel 2007 and later, or Excel 2003 and earlier).

NOTE: John Walkenbach’s Excel site was sold, and the Enhanced Data Form is no longer available there. However, you can still download the file, from the Wayback Machine website, on this copy of John’s download page.

  • The J-Walk Enhanced Data Form automatically creates a drop down list, if the data validation list is based on a range with the same name as the field. In this example, the data validation list in column B is based on the Product named range.

DataForm08

  • Another benefit of the J-Walk Enhanced Data Form is that it opens at the record that’s currently selected.
  • Also, you can drag the bottom right corner, to adjust the size of the form, and the data entry boxes.

Do You Use the Data Form?

What about you — do you use the Excel Data Form? Did you know that it existed? Are there any other Data Form quirks that you know about?
___________

0 thoughts on “Built-In Excel Data Form Tips and Quirks”

  1. I’m using a data form on an Excle 2007 spreadsheet that is protected. The problem is that when the spreadsheet is protected, the ‘clear’ button for clearing criteria searches is grayed out. This doesn’t seem to be a problem if each time you search the criteria you’re searching for is contained within your data set. However, if the criteria is not contained in the data set, the Data Form displays the record from the last sucessful search, which is a big, big problem. Is there a way to use the Data Form tool on a protected worksheet, and still retain the ‘clear’ button functionality?

  2. I have created a table to which i want to add a new row. I want to place a command button on sheet which will select all the rows in that table and add new details or modify existing ones. In short I want to assign the command button to a excel’s in built data form. How can I do it?

    1. Sub DataForm()
      ActiveSheet.showDataForm
      End Sub()
      You can assign a macro such as this to the command button.

  3. Hello Debra,
    We use the Built-in Data Entry form to make entries into a database. Our database has a macro to automatically sort a particular column alphabetically (ascending) whenever records are transferred from the Built-in Data Entry Form to the Database. The problem is that, after keying in the details into the Data Entry Form, and clicking ‘close’ – (there is no ‘Add Record’ button on the Data form), the record appears in the next blank row in the database, BUT the sort macro is not triggered. How can we get the macro to trigger the moment a record is transferred from the Data Form onto the database?

  4. Hi Debra,
    Have you or anyone found a way to configure/force the data form to use UK date format? Alternatively show month as text. I’d be happy to do it with VBA if there is an API or someway of controlling the object.

  5. Hi. I use the DataForm to enter / alter data in a table.
    I have other stuff on the Excel sheet that needs recalculation at Worksheet.Change. That I have put in a VBA code in Worksheet.Change.
    But the quirk is that when I close the DataForm, the data are entered in the table, and the sheet is not regarding this as a change.
    So my other data are NOT recalculated, before I do a manual change.
    How/where can I see the properties of the DataForm? I think I need a code like “On DataForm.Close Do Worksheet.Calculation” or like that.
    Any suggestions? 🙂

  6. Hi,
    I’ve somehow added the dataform to a button that appears on a customized ribbon. However, when I send the file to other users or they access the file from a shared server, the button is no visible to them. I’d like to attach the DataForm to a button that remains with the Workbook sothat the button will be visible on the table or on a Ribbon when shared and opened on any other computer, under any other user profile.
    Thanks!

  7. Hi Debra,
    Thanks for the great info.
    Is it possible to use the Built-In excel Data Form as a 2nd UserForm , meaning , when I Double click an item in a ListBox1 which I have in UserForm1 , I want the Data Form will pop up and show the item I choose which can modify ?
    Is It possible ?
    Thanks !
    Shlomi

Leave a Reply to Debra Dalgleish Cancel reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.