Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 24th, 2006, 03:24 PM
Authorized User
 
Join Date: Apr 2006
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Want to pass a row cursor to a function in a query

I have an update query that calls a function to calculate the value assigned in the set clause, but the calculation uses the values from 30 fields, which can't all be passed in one call, so I'm performing the calculation in two update statements.

    Update T
         Set F1 = Func( F2, F3, ... F30 )
     Where F31 = some condition

Is there a way to implicitly or explicitly pass a row cursor to the function so that it can look at all of the fields it needs to in one call? I tried passing in the record's primary key value, and then having the function open it's own recordset on the same table and fetching the row with that key value, but that was much too slow. I need to use the regular query tool, i.e., can't run the query in vb, and I'm using Access 2000.

Thank you.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Pass datatable to function tusharkale C# 1 August 4th, 2008 06:29 PM
How to pass gridview selected row msbsam ASP.NET 2.0 Basics 1 March 4th, 2008 09:17 AM
add a new row when cursor comes to the last field bullsb Classic ASP Professional 8 March 11th, 2007 04:11 PM
add a new row when cursor comes to the last field bullsb Javascript How-To 2 February 26th, 2007 11:26 PM
Pass an SQL row using hyperlink mawoodall Classic ASP Basics 19 May 31st, 2006 07:27 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.