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

Runtime Error 2136 on a Simple Form

Status
Not open for further replies.

jsteff

Technical User
May 22, 2003
109
US

My form runs perfectly. One of the users wants permission to use "DataSheetView" from the form. So i added the following as an "On Open" event for the form:

If (Environ("username") = "dwhit142") Then
Me.AllowDatasheetView = True
THIS code generates the following error:
runtime error 2136

However, the following code on the same form works perfectly:
If (Environ("username") = "dwhit142") Then
Me.AllowAdditions = True

Any ideas? thanks.

 
See if this works:

[tt]docmd.runcommand accmddatasheetview[/tt]

but I think the allowdatasheet property will need to be set to yes in the form properties dialog, I'm not sure it's available through code, but test it.

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top