Results 1 to 8 of 8
  1. #1
    neockder is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    14

    Angry openReport [where] condition brings up input box instead of finding correct value

    Thank you guys in advance for the help. I've luckily had a great mentor to hound when questions come about, as for now I Need all of You!

    I'm trying to open a report using the following code:


    Private Sub openCellarRpt_Click() DoCmd.OpenReport "cellarRPT", acViewReport, , "brewID = " & Me.subSchedBrew.Form.brewID, acDialog
    End Sub




    This opens the report 'cellarRPT' in dialog view, with the where condition setting the field 'brewID' on the report to the field 'brewID' located within a datasheet-view sub form 'subSchedBrew' on the main form that houses the button. I've used a very similar where condition on other forms/reports with great success. It's merely pointing at one record, and pulling up associated records in a linked table.

    In this case, i click the openCellarRpt button and it brings up an input box, which finds the value, but asks for it again. Title: Enter Parameter Value, Discription: The Value I need to link the report! If I copy the description into the input box, which is the value I'm looking for it to find, then it works perfectly. Otherwise it crashes.

    This picture should help explain, and thanks again for any help!!

    Click image for larger version. 

Name:	cellarButton.png 
Views:	20 
Size:	40.9 KB 
ID:	9650
    Last edited by neockder; 10-23-2012 at 05:18 PM.

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    One thing to check>> Do you have a field named "plan1294"?
    Somewhere, I think you typed in the data instead of the field name. (query maybe)

    Anytime a parameter value is asked for, it means that a field name in a query is not recognized/found.

  3. #3
    neockder is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    14
    Hmm, ok. Thanks for the response. What's weird is that it finds the correct value, from the correct record and field. The field is 'brewID,' which it finds. plan1294 is the record i'm looking to find (in this example).

    I'll definitely take a look at the queries in relation to that field, as those values are automated based upon some variables when created, and then changed when a status field changes.

    Thanks!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Note the different syntax for a text field:

    BaldyWeb wherecondition
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    neockder is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    14
    Quote Originally Posted by pbaldy View Post
    Note the different syntax for a text field:

    BaldyWeb wherecondition
    Thanks Baldy! You rock. That fixed it! Now I just need to play around with the query looks like, as it only brings up records in which a certain value is not null

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    neockder is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    14
    is there a way to mark this solved?

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Yes, under Thread Tools at the top of the thread.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. DoCmd.OpenReport WHERE condition
    By bidbud68 in forum Programming
    Replies: 16
    Last Post: 10-19-2012, 05:31 AM
  2. Replies: 11
    Last Post: 10-12-2012, 08:37 AM
  3. OpenReport WHERE Condition Not Working
    By altemir in forum Reports
    Replies: 1
    Last Post: 02-17-2012, 09:58 AM
  4. Replies: 3
    Last Post: 11-19-2010, 01:48 PM
  5. DoCmd OpenReport ... where condition with a Like
    By Grooz13 in forum Programming
    Replies: 4
    Last Post: 08-31-2010, 09:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums