View Full Version : How To Have Blank Data Fields When Entering A Form


DAPOOLE
01-25-2010, 04:58 AM
I have text boxes and list boxes on a form but whenever I open it the data of the first record within the table is shown. Is there a way to suppress this so that all data fields are blank?

Also how whenever I select data from a list box it is highlighted however how is it possible to unhighlight a data selection?

Thanks in advance.

vbaInet
01-25-2010, 05:04 AM
I have text boxes and list boxes on a form but whenever I open it the data of the first record within the table is shown. Is there a way to suppress this so that all data fields are blank?

Also how whenever I select data from a list box it is highlighted however how is it possible to unhighlight a data selection?

Thanks in advance.

Call the new record command on the On Load event of the form (i.e. place this code there):

DoCmd.RunCommand acCmdRecordsGoToNew


You can requery the listbox, select the first item and deselect it:

Listbox1.Requery
Listbox1.Selected(0) = True
Listbox1.Selected(0) = False