Results 1 to 6 of 6
  1. #1
    aamer is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Location
    Pakistan
    Posts
    276

    Help Me Fix Parameter Value

    Need Help To Fix The Following, Dont know where am making a mistake that when I run it, it asks Enter Parameter Value ?


    Which is the company name and is already selected.

    DoCmd.OpenReport "SalesWithNICrpt", acViewPreview, , "[CompanyName]=""" & [SleDescrip] & """"
    DoCmd.Close acForm, "Dialog General Sales"

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    CompanyName is a text field that has full company name and not a company ID?

    SleDescrip is a textbox with company name?

    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    aamer is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Location
    Pakistan
    Posts
    276
    SleDescrip is a textbox with company name? YES (It is not a company ID)

    SleDescrip is a textbox with company name? YES

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Show a picture of the parameter request.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    aamer is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Location
    Pakistan
    Posts
    276
    Sample DB Attached

    Sample.zip

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Cause of issue is misspelled field in Company table: ComapnyName should be CompanyName

    Should not save both CoID and CompanyName in Sales, only CoID. Use CoID to filter report.

    DoCmd.OpenReport "SalesWithNICrpt", acViewPreview, , "[CoID]=" & [Text13]
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 6
    Last Post: 08-13-2021, 01:37 PM
  2. Replies: 2
    Last Post: 07-13-2019, 02:45 PM
  3. Replies: 2
    Last Post: 01-26-2017, 08:19 AM
  4. Replies: 1
    Last Post: 02-28-2013, 01:20 PM
  5. Replies: 13
    Last Post: 01-10-2012, 09:56 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