amokoura Posted March 20, 2007 Share Posted March 20, 2007 I've succesfully controlled Access forms with AutoIt/COM. But now there's a problem: how can I give parameters to a method? For example, there's a "Seek" method mentioned in the Access VBA manual:Syntax:recordset.Seek KeyValues, SeekOptionAnd I try to use it this way in the code:$result = $objOrder.workOrders.Form.Recordset.Seek 1000, 1If I try running the code, I get syntax error:E:\AUTOIT\lopputesti\lopputesti.au3(221,44) : ERROR: syntax error $s = $oJob.showlabour.Form.Recordset.Seek 1000, 1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ E:\AUTOIT\lopputesti\lopputesti.au3 - 1 error(s), 0 warning(s) Link to comment Share on other sites More sharing options...
Locodarwin Posted March 20, 2007 Share Posted March 20, 2007 For methods, use this syntax: $oObject.Method($parameter1, $parameter2) Using your example: $result = $objOrder.workOrders.Form.Recordset.Seek(1000, 1) For properties, use: $oObject.Property = $value -S (Yet Another) ExcelCOM UDF"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly...[indent]...specialization is for insects." - R. A. Heinlein[/indent] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now