Getting a Parameter request on OpenForm criteria

Posted on 2012-09-05
Last Modified: 2012-09-05
I keep getting a "Enter Parameter Value"

With the Following Code:
Dim strQueNum As String
                     strQueNum = Me.List279

   Dim intCurrentRecord As Integer

'Store the current position
   intCurrentRecord = Me.CurrentRecord

'Open the popup form
    DoCmd.OpenForm "frm_FCastAdDetail", , , "[QueNum] =" & Me.List279
'Requery the form
    'Go to the stored current record
    DoCmd.GoToRecord acActiveDataObject, , acGoTo, intCurrentRecord

Open in new window

Q17 is the Value of Me.List279 - Which is the correct record ref. I want to open.

When I enter Q17 into the Parameter Query(Q17) it opens to the correct record.
I dont want a Parameter Query Named Q17  I want to open record Q17.....

What is wrong!

Question by:darkdell
    LVL 61

    Accepted Solution

    Try this:

        DoCmd.OpenForm "frm_FCastAdDetail", , , "[QueNum] ='" & Me.List279  & "'"
    LVL 119

    Expert Comment

    by:Rey Obrero
    change this line

     DoCmd.OpenForm "frm_FCastAdDetail", , , "[QueNum] =" & Me.List279


     DoCmd.OpenForm "frm_FCastAdDetail", , , "[QueNum] ='" & Me.List279 & "'"

    Author Closing Comment

    That was it........   arrrrrgh!

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Access DLookup 18 23
    Access Webapp: Table to Query to Table 14 36
    Access question - SELECT/UPDATE 11 25
    Running Sum Help 31 22
    The first two articles in this short series — Using a Criteria Form to Filter Records ( and Building a Custom Filter ( — discuss in some detail how a form can be…
    Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
    Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
    In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now