Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access 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 October 20th, 2003, 02:59 AM
Registered User
 
Join Date: Jul 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default macro - loop

Hi
I am trying to use a macro to run an Append Query. The number of times the query needs to run is determined by the number of months from a certain date to now. The problem that I am experiencing is in referring to a field in a query or table in the "repeat expression" part of the macro.

[LastDate]![LastOfBalDate]< Now()

It seems the macro will only look for controls in forms or reports. How do I get it to look at a query?

thanks for your help
liz


 
Old October 20th, 2003, 09:29 AM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Create a form with a textbox. Use the textbox inside the query to delimit the dates needed. Run the macro from a button on the form. Enter the date (or dates) in the textbos and it should run.



Sal





Similar Threads
Thread Thread Starter Forum Replies Last Post
calling to xlam macro from macro inside xlsb SteveB Excel VBA 0 June 30th, 2008 06:43 PM
macro on outlook spm74 ASP.NET 1.0 and 1.1 Basics 1 January 14th, 2005 05:11 PM
Macro Help! Jolin VB How-To 0 April 22nd, 2004 08:38 AM
nested while loop doesn't loop hosefo81 PHP Databases 5 November 12th, 2003 08:46 AM
Macro KennethMungwira Access 1 June 13th, 2003 12:00 AM





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