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 29th, 2005, 09:35 AM
Authorized User
 
Join Date: Jun 2005
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am assuming you have a parameter in the query? BTW the "Duh" refers to me, not you

 
Old June 29th, 2005, 09:39 AM
Authorized User
 
Join Date: Jun 2005
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

And also, importantly, you need to have the form open when you run the query. If you are running the query manually, you will be prompted for Forms!frmCriteria!cboMonth, but in VBA you would get a missing parameter error, I believe, if frmCriteria was not open.

 
Old July 4th, 2005, 08:31 AM
Authorized User
 
Join Date: Apr 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Many thanx and sorry for the delayed response,

I have removed the parameter from the query and the information is now exported for that specific month as intended. However as I have removed the parameter from the query - when I open the form it no longer returns/filters the records based on the parameter chosen from the combobox accordingly which will allow the users to report on that specific month.

Therefore I was going to ask for some advice. Should I just create another query with this parameter in place which will be called when the form is opened or is there some way to programatically pass the value in.

Many thanks

 
Old July 5th, 2005, 10:01 AM
Authorized User
 
Join Date: Jun 2005
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

could u post the underlying SQL statement of your query? That would enable me to give u a more intelligent answer to your question.

 
Old July 18th, 2005, 04:19 AM
Authorized User
 
Join Date: Apr 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Many thanks for your help and apologise for the delay.

My manager decided it would be better to remove the availabilty of users being able to select which month they would be reporting for. Therefore I have managed to pass this value automatically passed for the reporting month.

Again many thanks for your help





Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing parameters to crystal reports at runtime tbhakee Crystal Reports 14 September 11th, 2013 05:49 AM
hi i got runtime error 13 Type Mismatch error sriharsha345 Access VBA 2 February 21st, 2008 09:30 AM
SQL runtime error 3061 chef01_99 Access VBA 2 June 17th, 2007 06:27 AM
mysterious error runtime error '451' coyotworks Excel VBA 1 May 12th, 2006 03:57 PM
passing parameters at runtime using crystal report anilkumar Crystal Reports 2 January 3rd, 2004 01:35 AM





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