Results 1 to 5 of 5
  1. #1
    sk88 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    183

    Export crosstab queries

    Need help



    I have a cross tab queries where user can enter date parameter to show the results
    Code:
    [Enter Start Date "dd-mm-yy"] with data type Date/Time 
    [Enter End Date "dd-mm-yy"] with data type Date/Time

    with
    Code:
    Between [Enter Start Date "dd-mm-yy"] And [Enter End Date "dd-mm-yy"]
    under criteria under DATE field and the Total is set to WHERE.

    When I hit export, it ask me to enter the date parameter twice. Any idea?
    Thanks

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Don't use input popups. Use a form for input of criteria and the query parameters reference controls on the form.
    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
    sk88 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    183
    Quote Originally Posted by June7 View Post
    Don't use input popups. Use a form for input of criteria and the query parameters reference controls on the form.
    Thanks June7. Would you be able to provide codes for that? I tried the below code and it gave me an error:

    Code:
    Between [Forms]![FormName]![StartDate] And [Forms]![FormName]![EndDate]
    Click image for larger version. 

Name:	exporterror.jpg 
Views:	6 
Size:	47.3 KB 
ID:	19831

    I have a form with fields called StartDate and EndDate
    Both fields are unbound fields.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    So the form name is Export and that is what you actually used, not FormName?

    See if this helps http://allenbrowne.com/ser-67.html#Param
    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.

  5. #5
    sk88 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    183
    Quote Originally Posted by June7 View Post
    So the form name is Export and that is what you actually used, not FormName?

    See if this helps http://allenbrowne.com/ser-67.html#Param

    Thank you so much! Its working!

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

Similar Threads

  1. Replies: 3
    Last Post: 02-20-2015, 02:17 PM
  2. Crosstab Query Values Export as Text
    By Paul H in forum Queries
    Replies: 0
    Last Post: 01-07-2013, 11:18 AM
  3. CrossTab Queries
    By wanware in forum Access
    Replies: 1
    Last Post: 06-26-2012, 11:47 AM
  4. Crosstab and Export Form example
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 08-24-2010, 12:30 AM
  5. Crosstab Queries
    By albst130 in forum Queries
    Replies: 0
    Last Post: 03-07-2007, 09:32 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