Results 1 to 6 of 6
  1. #1
    barkarlo is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2006
    Location
    croatia
    Posts
    10

    crosstab query


    In The Access database writes data about bus tours.Records are: start date, end date, name tours, number of passengerer, place of arrival and departure, etc.
    For example: name "Fabulosa", pax 45, arrival: Ljubljana 12.01.2013., departure: Dubrovnik 21.01.2013..
    How to make a crosstab query which would include columns StartDate and ENDDATE were presented column
    all days of the year.
    for example:
    Row heading: STARTDATE, ENDDATE, name tours
    Column heading date: 1.1.2013., 2.1.2013., 3.1.2013., .............. 31.12.2013 ..
    Value: the highlighted range between StartDate and ENDDATE.
    Thanks for your reply,

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    One way is to do two crosstab queries - one for StartDate and one for EndDate - then join the crosstabs on the common ID key.

    Review http://allenbrowne.com/ser-67.html

    Stabilizing a crosstab to run perpetually in a report is tricky, especially when pivoting on dynamic date criteria. The above link might help with that, also
    http://www.access.hookom.net/Dynamic...rosstabRpt.htm
    http://support.microsoft.com/kb/328320
    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
    barkarlo is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2006
    Location
    croatia
    Posts
    10

    Crosstab query

    Copy of Ture2013 with itinerary.mdb
    Quote Originally Posted by June7 View Post
    One way is to do two crosstab queries - one for StartDate and one for EndDate - then join the crosstabs on the common ID key.

    Review http://allenbrowne.com/ser-67.html

    Stabilizing a crosstab to run perpetually in a report is tricky, especially when pivoting on dynamic date criteria. The above link might help with that, also
    http://www.access.hookom.net/Dynamic...rosstabRpt.htm
    http://support.microsoft.com/kb/328320
    The database, which is attached to the ship, there are a few tables, queries and forms.
    One of the tables is the "Itinerary" in which the data is stored names tour, days on the tour (like 1Day, 2day, 3Day, ...) and relations between the two cities.
    I would like to see in a query where the bus route by days between the start date and end date tours.
    Something similar query "query1" only instead 1Day, 2day, 3Day, ..... should see the days between two dates.
    Can it be done and how?.
    If you don't open, open with shift-enter button.
    Thanks

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    The Intinerarytour table is not a normalized structure.

    What you want will probably require VBA code.

    You are trying to build a calendar?

    Calendar database is not easy but has been done. Search forum or google. Review https://www.accessforums.net/forms/c...ess-24472.html
    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
    barkarlo is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2006
    Location
    croatia
    Posts
    10

    Bustourname_crosstab query export to excel

    Copy of ture2013 - Copy (2).mdbIn the database, I am sending you, I have a crosstab query "bustourname_crosstab" which shows me the dates between the two dates, and the value is displayed as "X" under each date that corresponds to the range of the start date and end date.
    Use the form "CreateCalender" create excel file in which the range of cells below the daily date highlighted in red, and the corresponding duration tours.
    This is good if you want to see a graphical representation for bus tours, but
    I want to see the query that would graphically show per tour bus schedule
    in the line.
    For example: The bus, which was scheduled to tour "Semana Santa1" from 23.3.2013 to 31.3.2013 and again on tour "JTBTC7P9" from 3.4.2013. to 10.4.2013. that it is displayed in a line.
    Now they can do it only to make two lines.

  6. #6
    barkarlo is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2006
    Location
    croatia
    Posts
    10

    Link Calendar form with another form.

    Quote Originally Posted by June7 View Post
    The Intinerarytour table is not a normalized structure.

    What you want will probably require VBA code.

    You are trying to build a calendar?

    Calendar database is not easy but has been done. Search forum or google. Review https://www.accessforums.net/forms/c...ess-24472.html
    Click image for larger version. 

Name:	Calendar form.PNG 
Views:	10 
Size:	115.7 KB 
ID:	11292Click image for larger version. 

Name:	Form tour2013.PNG 
Views:	10 
Size:	116.6 KB 
ID:	11293

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

Similar Threads

  1. Crosstab query
    By Deutz in forum Queries
    Replies: 8
    Last Post: 01-08-2013, 03:37 PM
  2. Crosstab Query
    By jones in forum Queries
    Replies: 4
    Last Post: 09-05-2012, 06:31 AM
  3. Crosstab Query Help
    By ksmith in forum Programming
    Replies: 7
    Last Post: 12-01-2010, 07:00 AM
  4. Replies: 1
    Last Post: 07-30-2010, 10:28 AM
  5. Query - Crosstab ?
    By rob4465 in forum Access
    Replies: 1
    Last Post: 01-28-2010, 08:41 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