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 June 28th, 2004, 03:12 AM
Registered User
 
Join Date: Jun 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADO - function use SQL to return maximal value

Function HELP() 'Pavel Humenuk

Dim strSQL As String
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
    strSQL = "SELECT Max(CAS)as x FROM [NORMY]"
rst.Open strSQL, CurrentProject.Connection, adOpenStatic

    HELP = rst("x")
    MsgBox "Maximal value is: " & HELP

rst.Close
Set rst = Nothing
End Function
 
Old June 28th, 2004, 04:14 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Can you please elaborate what is required..?

Om Prakash





Similar Threads
Thread Thread Starter Forum Replies Last Post
function return 'Nothing' problem srinuRocks ASP.NET 2.0 Basics 0 March 10th, 2005 10:32 AM
How to return array value from a function nebpro BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 September 29th, 2004 12:14 PM
how to get a function to return a recordset object lcsgeek Classic ASP Databases 3 September 22nd, 2004 03:30 PM
Return a UDT from a function alex_read Pro VB 6 1 April 23rd, 2004 05:37 AM
ADO .NET return params bmains ADO.NET 2 October 16th, 2003 07:03 AM





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