Results 1 to 8 of 8
  1. #1
    Tony Gilbert is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    May 2017
    Posts
    5

    Query becomes uneditable

    I have, what I thought to be, a simple query:

    SELECT tblCompanyMonths.ID, tblCompanyMonths.Company, tblCompanyMonths.MonPay, tblCompanyMonths.DueDate, tblCompanyMonths.Amount, tblReportDate.MonthNum
    FROM tblCompanyMonths, tblReportDate
    WHERE (((tblCompanyMonths.MonPay)=[tblReportDate].[MonthNum]))



    By adding the tblReportDate and restricting the query to only the MonthNum in this table the query became un-editable.

    Is there a way to make the query editable again keeping the restriction?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,515
    some queries cause this uneditable join.
    you could remove the tblReportDate, instead offer it on a form as a combo box.
    user picks the date there, and the query uses the form date instead of the join.

    select * from tblCompanyMonths where [monPay]=forms!myForm!cboMonth

    then the query should be editable.

  3. #3
    Tony Gilbert is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    May 2017
    Posts
    5
    Thanks, I'll give it a try - gonna take a while!

  4. #4
    Tony Gilbert is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    May 2017
    Posts
    5
    Query now reads:
    SELECT tblCompanyMonths.PayDate, tblCompanyMonths.Company, tblCompanyMonths.[monPay], *
    FROM tblCompanyMonths
    WHERE (((tblCompanyMonths.[monPay])=[forms]![ReportMonth]![cboMonth]))
    ORDER BY tblCompanyMonths.PayDate, tblCompanyMonths.Company;

    It works (great!) but I have to “Enter Paramater Value” in a pop-up box.

    Is there a way I don’t have to re-enter the MonthNum that’s already in frmReportMonth?

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,795
    If the form is open when the query or report runs, should work.

    I don't use dynamic parameterized queries. I prefer to build criteria string in VBA and set the OpenReport WHERE CONDITION argument. Review https://www.accessforums.net/showthread.php?t=67067
    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.

  6. #6
    Tony Gilbert is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    May 2017
    Posts
    5
    Unfortunately I still have to enter the MonthNum even with the frmReportMonth open.

    Life is so tough - it looks like I'm having to use a keyboard key and an extra mouse click to get the job done!

    Many thanks for your reply
    Tony

  7. #7
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Unfortunately I still have to enter the MonthNum even with the frmReportMonth open.
    You say your form is called frmReportMonth above, but your SQL is:

    SELECT tblCompanyMonths.PayDate, tblCompanyMonths.Company, tblCompanyMonths.[monPay], *
    FROM tblCompanyMonths
    WHERE (((tblCompanyMonths.[monPay])=[forms]![ReportMonth]![cboMonth]))
    ORDER BY tblCompanyMonths.PayDate, tblCompanyMonths.Company;
    - not the same form name.

    That could be the problem.

  8. #8
    Tony Gilbert is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    May 2017
    Posts
    5
    Thank you for noticing that.

    I've made the change and it all worked out!

    Many thanks for your help.
    Tony

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

Similar Threads

  1. Copied report columns, gridlines uneditable
    By hardwood in forum Reports
    Replies: 1
    Last Post: 06-14-2011, 06:22 PM
  2. Form which is uneditable
    By sabre1 in forum Forms
    Replies: 2
    Last Post: 11-05-2010, 06:21 AM
  3. Replies: 3
    Last Post: 09-07-2010, 02:27 PM
  4. Make entries uneditable based on checkbox
    By acehowell in forum Programming
    Replies: 1
    Last Post: 04-19-2007, 07:54 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