Run Time Error 35012

garrydawkins
04-02-2003, 10:44 AM
Method 'Form' of object'_Subform' failed.
I have a form and a sumform that is driven by a query. Upon testing of the query to modify the results of the sub form I get this error message. The debugger dumps me to the attached module. When attempting to make changes I get another error "error accessing file, network connection may be lost. Any help would be appreciated.

ahgao2
04-02-2003, 10:55 AM
i think I know what's your problem. Everytime you type frmSubPurchaseOrder, you are actually creating new instances of frmSubPurchaseOrder, and because of that some parts of your frmSubPurchaseOrder did not get the connection to the database.
What you should do is something like this


option explicit
'You can declare it here if you wish to
dim purchasing as frmSubPruchaseOrder

private sub form_current()
set purchasing=new frmSubPurchaseOrder
if txtOrderPrinted=false then
purchasing.Form.AllowDeletions=false
'and so on.... with purchasing.(your method names)
else
purchasing.Form.AllowDeletions=false
'same as above
end if
end sub

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum