Need to change Data Entry to "No"

I

Iram

Hello,

I have a form called "frm_AddRegistration" and it's Data Entry setting set
to "Yes" in it's form properties. I access this form through the Switchboard
in Add Mode.

If I wanted to open this same form and change it's Data Entry setting to
"No" by using a command button on a different form (other than the
switchboard) how would I code the VBA?

....And On Close of the "frm_AddRegistration" form how would I code it to
change the Data Entry back to "Yes"? I need it to revert back to Yes since I
access it from the Switchboard to add records in Data Entry mode.

Your help is greatly appreciated.


Thanks.
Iram/mcp
 
P

PieterLinden via AccessMonster.com

Iram said:
Hello,

I have a form called "frm_AddRegistration" and it's Data Entry setting set
to "Yes" in it's form properties. I access this form through the Switchboard
in Add Mode.

If I wanted to open this same form and change it's Data Entry setting to
"No" by using a command button on a different form (other than the
switchboard) how would I code the VBA?

...And On Close of the "frm_AddRegistration" form how would I code it to
change the Data Entry back to "Yes"? I need it to revert back to Yes since I
access it from the Switchboard to add records in Data Entry mode.

Your help is greatly appreciated.

Thanks.
Iram/mcp

This doesn't make much sense. You can change the DataEntry property of the
form when you open it... why do you need to change it on the close event?
Because you're letting users see the database window? Don't do that.
Problem solved.

Private Sub cmdOpenFormDEYes_Click()
On Error GoTo Err_cmdOpenFormDEYes_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Case"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Forms(stDocName).DataEntry = True '<-- Now form opens for Data entry....

Exit_cmdOpenFormDEYes_Click:
Exit Sub

Err_cmdOpenFormDEYes_Click:
MsgBox Err.Description
Resume Exit_cmdOpenFormDEYes_Click

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Split form 0
Data Entry = No 6
Turning on and off Data Entry 1
Is this possible? 0
How do I clear a form? 0
Cell data entering slow! 0
Optionbutton Not working 3
Copy previous record into form field 0

Top