lashler2
asked on
Error 438 Obejct doesn't support property or method
I have a front end database that is being distributed to several users. The front end works perfect on my laptop, and another desktop I tested it on.
However when I placed the database on a second deskstop to test the following code gives me an error.
Note the code works perfect on the two previous pcs I tested it on so I am guessing the problem has to do with a setting. can anyone help.
See code below.
Private Sub lockfields()
For Each ctl In Forms!frmPurchaseOrderMain
On Error Resume Next
Err = 0
Me(ctl.Name).Locked = True <------------------- Error Occurs Here
On Error Resume Next
Err = 0
Next ctl
Forms!frmPurchaseOrderMain .Refresh
Forms!frmPurchaseOrderMain .Requery
End Sub
However when I placed the database on a second deskstop to test the following code gives me an error.
Note the code works perfect on the two previous pcs I tested it on so I am guessing the problem has to do with a setting. can anyone help.
See code below.
Private Sub lockfields()
For Each ctl In Forms!frmPurchaseOrderMain
On Error Resume Next
Err = 0
Me(ctl.Name).Locked = True <------------------- Error Occurs Here
On Error Resume Next
Err = 0
Next ctl
Forms!frmPurchaseOrderMain
Forms!frmPurchaseOrderMain
End Sub
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the comments I will check to see if any of the suggestions fixed the problem when I go back to the computer giving the error in about two hours.
I am still curious as to why the error will show up on one computer but not the other two?
Any suggestions?
I am still curious as to why the error will show up on one computer but not the other two?
Any suggestions?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
;-)
For Each ctl In Forms!frmPurchaseOrderMain
On Error Resume Next
Err = 0
Forms("frmPurchaseOrderMai
On Error Resume Next
Err = 0
Next ctl
Forms!frmPurchaseOrderMain
Forms!frmPurchaseOrderMain
End Sub