Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open form with empty fields

Status
Not open for further replies.

3699wat

Technical User
Sep 30, 2002
28
US
Have a form with a listbox. Clicking on an option in the listbox populates the fields related to that person on the form. How do I set the property of a form so it opens with all fields empty, but still shows the options in the listbox and allowing me to call the appropriate record. If I set the Data Entry property to YES , I get a runtime error 3021 – No current record.
 
Off the top of my head the only thing that I can think of is using a vb statement.

If you want try this:

In your vb code editor use a statement like the following:

Private Sub Form_Load()
txtbox1.Value = " "
txtbox2.Value = " "
txtbox3.Value = " "
End Sub

Do this for all the textboxs that you have on your form and when you load the form at run time all your fields are blank except for the ones that you do not include in the onload statement as shown above.

let me know if this works for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top