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!

Form not opening for data entry..

Status
Not open for further replies.

KaayJaay

IS-IT--Management
Jul 6, 2004
64
US
I have a form set for Data Entry but, when the form opens up, it opens with existing records displayed in my text box fields as opposed to the default values that i had specified. I thought that maybe by turning off the allow additions, allow edits, and allow deletions, since all i want to be able to do is find info, i thought that would work, but when i do that all i see is a blank screen.(I would like to kno why is this?), but I want to be able to open the form with the default values in the text box, so the user can find certain records. Any suggestions?

KaayJaay
 
Here's a hint:
In Design view, Properties, press the F1 key to open the Help file for the particular property. This comes up for "DataEntry":

++++++++++++++++++++++
You can use the DataEntry property to specify whether a bound form opens to allow data entry only. The Data Entry property doesn't determine whether records can be added; it only determines whether existing records are displayed.

Setting

The DataEntry property uses the following settings.

Setting Visual Basic Description
Yes True (–1) The form opens showing only a blank record.
No False (0) (Default) The form opens showing existing records.

You can set the DataEntry property by using a form's property sheet, a macro, or Visual Basic.

This property can be set in any view.

Remarks

The DataEntry property has an effect only when the AllowAdditions property is set to Yes.

Setting the DataEntry property to Yes by using Visual Basic has the same effect as clicking Data Entry on the Records menu. Setting it to No by using Visual Basic is equivalent to clicking Remove Filter/Sort on the Records menu.

Note When the Data Mode argument of the OpenForm action is set, Microsoft Access will override a number of form property settings. If the Data Mode argument of the OpenForm action is set to Edit, Microsoft Access will open the form with the following property settings:

AllowEdits — Yes
AllowDeletions — Yes
AllowAdditions — Yes
DataEntry — No

To prevent the OpenForm action from overriding any of these existing property settings, omit the Data Mode argument setting so that Microsoft Access will use the property settings defined by the form.

++++++++++++++++++++++++++++++++

If you want the form to open to a new record, try something like this:

DoCmd.GoToRecord , , acNewRec

in the OnOpen event.

TomCologne
 
How are TomCologne . . . .

Not quite right . . . . . .

[blue]Data Entry Mode[/blue] strictly involves [blue]adding new records only![/blue] This is its main purpose. This is why [blue]what you see is a single record for input[/blue], and why [purple]Allow Additions[/purple] has to be set To Yes. [purple]Allow Additions[/purple] determines if you can add a new record.

Try it yourself and you'll see, you can add new record, after new record, after new record, . . . . . .

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top