# Form based on Database table with no record selected

**URL:** <https://forum.servoy.com/t/form-based-on-database-table-with-no-record-selected/14045>\
**Category:** Classic Servoy\
**Created:** [May 25, 2011, 2:05pm UTC](https://forum.servoy.com/t/form-based-on-database-table-with-no-record-selected/14045 "2011-05-25T14:05:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lachness](https://avatars.discourse-cdn.com/v4/letter/l/b782af/32.png) [@Lachness](https://forum.servoy.com/u/Lachness)\
**Post date:** [May 25, 2011, 2:05pm UTC](https://forum.servoy.com/t/form-based-on-database-table-with-no-record-selected/14045/1 "2011-05-25T14:05:38Z")

</div>

Hello,

I have a need to show a form that is based on a database table with no record displayed (selected).

The default behaviour is to display the first record in the datatable/foundset.

What is the process to _not_ show a record? I want the user to have to enter a valid key to find and display.

thx

---

<div class="post-metadata">

**Author:** ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)\
**Post date:** [May 25, 2011, 2:10pm UTC](https://forum.servoy.com/t/form-based-on-database-table-with-no-record-selected/14045/2 "2011-05-25T14:10:56Z")

</div>

to show, no records, in a form you can do: foundset.clear() in the onLoad or onShow… depends, on what you want…

but what i don’t understand is, you want NO records, but you want the use to have enter a valid key to find and display??

this I don’t understand

---

<div class="post-metadata">

**Author:** ![Lachness](https://avatars.discourse-cdn.com/v4/letter/l/b782af/32.png) [@Lachness](https://forum.servoy.com/u/Lachness)\
**Post date:** [May 25, 2011, 9:59pm UTC](https://forum.servoy.com/t/form-based-on-database-table-with-no-record-selected/14045/3 "2011-05-25T21:59:28Z")

</div>

THx Harjo that worked like a champ.

In the focus lost event of the order\_number element I retrieve the record they request.

I hope that is not to wierd!

Lach
