Open form with text box values empty

sstasiak

Registered User.
Local time
Today, 06:29
Joined
Feb 8, 2007
Messages
97
I've got a form that contains a combo box. When a selection is made from the combo box, the rest of the fields automatically populate with the data associated with the selection.

This works fine, but when the form first opens, there are values already in the text fields before I make a selection from the combo box. The values that appear are the ones associated with the first entry in the table.

What could I do so that when the form opens, all fields are empty?
 
If they aren't bound, you can clear them in the form's OnCurrent event. If they are bound, that's why they have data.
 
you could hide them until a selection is made
 
They are bound. Is there something I can do in the OnLoad event to open the form with all values cleared?
 
Gotta ask this question, if they are bound, then if you clear them you are clearing the record. If you want a new record, just open the form to a new record.
 
its a combo box, so im assuming hes searching the records...
 
its a combo box, so im assuming hes searching the records...

But if he's searching the records, and the form is bound, to display the bound part as empty, he'll still need to start at a new record.
 
True, might not want to be able to add a new record.. guess we need more info
 
he doesn't have to add a new record, just start at a new record when the form opens so that there are no records displayed. When you open to a new record, it doesn't mean you have to actually add one.
 
true, but hell have to take other percautions to assure a new entry cant be added... ie someone types something into a box that shouldnt have been typed in
 
I set it up to start a new record when the form opens, and now it opens the form with the fields clear until I make a combo box selection.

Thanks

I will have to do something to prevent the addition of a record though...
 

Users who are viewing this thread

Back
Top Bottom