Open Form In Add Mode

djwasim

Registered User.
Local time
Today, 12:03
Joined
May 29, 2009
Messages
93
Hello

I am using this code for opening a form with subform but i want to open form in add mode. Plz tell me how is it possible? Which code can i use?


I am using this code

Private Sub Command5_Click()
Me.Object2.SourceObject = "Payments"
End Sub



Dj Wasim
Pakistan
 
Me.Form.DataEntry = True

To clarify .Form means the form property of Me not the name of a form.
 
but which complete code i will put into on_clik event in button?
Because i want to open my form in subform unbound object
 
Object2 is the subform control which will display the payment form?

Private Sub Command5_Click()
Me.Object2.SourceObject = "Payments"
Me.Object2.Form.DataEntry = True
End Sub
 
i put this code in my data base but now there is nothing to show in subform object
i mean to say that sub form is not showing detail section of the form only form header is showing instead of whole form.
 
i use to hide database window in my project
but when i use to unhide the data base window then every form is showing detail and header section of the form properly but when i use to hide the database window then only header section is showing not detail section.

plz help me
 
i put this code in my data base but now there is nothing to show in subform object
i mean to say that sub form is not showing detail section of the form only form header is showing instead of whole form.

Data entry mode is used for adding new records. It shows an empty set of fields to be filled out for making new records.

I assume you have your form in Datasheet view. I would expect one empty line to appear.

Perhaps you are looking for:
.Form.AllowAdditions = True

Other properties that may be of interest:
AllowEdits
AllowDeletions
 

Users who are viewing this thread

Back
Top Bottom