Results 1 to 2 of 2
  1. #1
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    Syntax Error For Main Form Subform Report

    My Main Forms name is CheckRegister and on it is a subform named FReg and it is from the subform that the command button is used to open the Report.Reports opens fine, just the Header expression is wrong and gives me the old name error. Here is my code for the expression. it is a textbox.

    ="Check Reconciliation for
    the Time Period of " & [Forms]![CheckRegister]![FReg]![StartDate] & " thru " & [Forms]![CheckRegister]![FReg]![EndDate]

    Also, here is the code that runs when thru vba to open the report.


    DoCmd.OpenReport stDocName, acPreview, , "([BalDate] Between #" & Me.StartDate & "# And #" & Me.EndDate & "#) And debit>0 And Void <3"

    I am guessing this is where the problem is!
    Last edited by burrina; 12-27-2012 at 12:27 AM. Reason: forgot one thing.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    I can't see anything wrong with expression or code.
    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. Open Report From Subform on Main Form
    By burrina in forum Forms
    Replies: 4
    Last Post: 12-25-2012, 08:11 PM
  2. Replies: 6
    Last Post: 08-22-2012, 03:24 AM
  3. Replies: 3
    Last Post: 04-17-2012, 10:28 AM
  4. Link main form with subform
    By lizzywu in forum Forms
    Replies: 1
    Last Post: 11-18-2011, 03:22 PM
  5. Replies: 4
    Last Post: 05-17-2010, 05:32 PM

Tags for this Thread

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