A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Form/Query Problem



 
 
Thread Tools Display Modes
  #1  
Old November 7th, 2005, 10:32 PM
Lisa
external usenet poster
 
Posts: n/a
Default Form/Query Problem

In my subform 'Orders Special Products Details Extended subform' I have

a command button named 'cmdPrintSpecialOrderGiftReceipt' to bring up a
report preview. There is a query to fliter the report called
'qrySpecialOrdersGiftReportFilter'. When I use the button I get a ENTER

PARAMETER VALUE message box.


The code I used for the command button is:


Private Sub cmdPrintSpecialOrderGiftReceipt_Click()
On Error GoTo Err_cmdPrintSpecialOrderGiftReceipt_Click


Dim stDocName As String


stDocName = "Special Orders Gift Report"
DoCmd.OpenReport stDocName, acViewPreview,
"qrySpecialOrdersGiftReportFilter"


Exit_cmdPrintSpecialOrderGiftReceipt_Click:
Exit Sub


Err_cmdPrintSpecialOrderGiftReceipt_Click:
MsgBox Err.Description
Resume Exit_cmdPrintSpecialOrderGiftReceipt_Click


End Sub


For the query I used:
Field: qrySpecialOrdersGiftReport.*
Table:qrySpecialOrdersGiftReport
Show: Yes


Field: SpecialOrderID
Table: qrySpecialOrdersGiftReport
Show: No
Criteria: [Forms]![Orders Special Products Details Extended
subform]![SpecialOrderID]


Can anyone offer assistance in detecting where my error is? Thank you
for the support


If I can ever get it working right I will change to acViewNormal
instead of preview.

  #2  
Old November 7th, 2005, 11:25 PM
Klatuu
external usenet poster
 
Posts: n/a
Default Form/Query Problem

The problem is you need to identify the main form in your criteria.
Criteria: [Forms]![MyMainFormNameGoesHere]![Orders Special Products Details
Extended subform]![SpecialOrderID]


"Lisa" wrote:

In my subform 'Orders Special Products Details Extended subform' I have

a command button named 'cmdPrintSpecialOrderGiftReceipt' to bring up a
report preview. There is a query to fliter the report called
'qrySpecialOrdersGiftReportFilter'. When I use the button I get a ENTER

PARAMETER VALUE message box.


The code I used for the command button is:


Private Sub cmdPrintSpecialOrderGiftReceipt_Click()
On Error GoTo Err_cmdPrintSpecialOrderGiftReceipt_Click


Dim stDocName As String


stDocName = "Special Orders Gift Report"
DoCmd.OpenReport stDocName, acViewPreview,
"qrySpecialOrdersGiftReportFilter"


Exit_cmdPrintSpecialOrderGiftReceipt_Click:
Exit Sub


Err_cmdPrintSpecialOrderGiftReceipt_Click:
MsgBox Err.Description
Resume Exit_cmdPrintSpecialOrderGiftReceipt_Click


End Sub


For the query I used:
Field: qrySpecialOrdersGiftReport.*
Table:qrySpecialOrdersGiftReport
Show: Yes


Field: SpecialOrderID
Table: qrySpecialOrdersGiftReport
Show: No
Criteria: [Forms]![Orders Special Products Details Extended
subform]![SpecialOrderID]


Can anyone offer assistance in detecting where my error is? Thank you
for the support


If I can ever get it working right I will change to acViewNormal
instead of preview.


  #3  
Old November 8th, 2005, 01:37 AM
Lisa
external usenet poster
 
Posts: n/a
Default Form/Query Problem

Thank you! It works with no problem now. I really appreciate the
assistance.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange problem with different networks. Adam General Discussion 1 March 13th, 2005 10:17 PM
IE6 & Outlook Problem (Strange Problem)! KW Outlook Express 4 February 1st, 2005 08:31 AM
Reinstalling OE... KAR Outlook Express 24 August 21st, 2004 06:52 PM
Productkey problem when installing office 2003 on network Stefan Schreurs Setup, Installing & Configuration 1 June 1st, 2004 11:16 PM
word error mac General Discussions 1 May 6th, 2004 08:14 AM


All times are GMT +1. The time now is 04:13 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.