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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form allowing edits problem!

Status
Not open for further replies.
Jan 27, 2003
35
0
0
GB
I have a form which is allowing me to edit the data shown on it.

i have set the form properties to allow edits = NO

I have me.allowedits = false on the Form_Load() event procedure and on Form_Current() event procedure but for some reason i can still edit the information on the form.

The form is opened via another form i.e.

Form one
select person ( related to person table)
a button to open second form

Form two
Shows injuries that person has had (related to injury table)
search various injury instances.


any ideas
 
In the code of the button on form one put this:

DoCmd.OpenForm "name of form two", acNormal, , , acFormReadOnly
 
The button on form 1 was created using the wizard in order to link the two forms:

-----------------------------------------------------------
Private Sub Openphys_Click()
On Error GoTo Err_Openphys_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "phys"

stLinkCriteria = "[PlayerNo]=" & Me![PlayerID]
DoCmd.OpenForm stDocName, , , stLinkCriteria me.Allowedits = False
Exit_Openphys_Click:
Exit Sub

Err_Openphys_Click:
MsgBox Err.Description
Resume Exit_Openphys_Click

End Sub
-----------------------------------------------------------

I have noticed that the undo button in the toolbar at the top shows 'undo current field/record' (Form 2) before i do anything. if i click on this i can no longer edit the data.

any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top