Results 1 to 10 of 10
  1. #1
    FL0XN0X is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Location
    Belgium
    Posts
    84

    Some kind of Crosstab Query (part4): Best practices for updating records withDate filtering

    Dear,

    In part 3 of my corresponding post, I have explained I have a table which contains following data:

    ID - KalenderID-CustomerId-TypeOfReservationId

    Now I want to build 'the best' user interface to update the TypeOfReservationId. In the Datasheet View, there is VERY handy Date filtering functionality, where I can choose 'this week, 'this month', 'this quarter', .... However, these 'advanced' date filtering is only available in Datasheet View (I think).

    Question
    I would like to build a Form where all records based on a 'Start Date' and 'Stop Date' parameter are shown and where the records are grouped by date. Additionally, the TypeOfReservationID must be updatable. This can be achieved easily by making the form in Datasheet view, but I want it (if possible) in Form view

    Eg.:
    2 Text boxes where you can enter Start and Stopdate and based on these values, the corresponding records must be shown.
    e.g.:
    Start Date : 1/1/2018
    Stop Date: 31/01/2018

    The form should show, grouped by date:

    Date1
    Record1: CustomerId - TypeOfReservationId


    Record2: CustomerId - TypeOfReservationId
    Date2
    Record3: CustomerId - TypeOfReservationId
    Record4: CustomerId - TypeOfReservationId
    ...

    AND TypeOfReservationId which is populated by a drop down, must be updatable, i.e. it must be possible to select another value of the dropdown so the underlaying table is updated with the new selected value.

    Is this feasible? (I think it comes down to updating Values of a Crosstab query ?).

    Thank you in advance.
    Kind regards,
    Bart

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Those 'advanced' filters available in any view with right click shortcut menu.

    However, review http://allenbrowne.com/ser-62.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.

  3. #3
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Crosstab queries are NOT updateable
    To get around that, use the crosstab to populate a temp table and use that as the record source for the form
    Then save the data from the form back to the original table(s) used as the source for the crosstab

    See my similar answer just posted in post 8 of this thread: https://www.accessforums.net/showthr...947#post388947
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  4. #4
    FL0XN0X is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Location
    Belgium
    Posts
    84
    June7,

    Thank you. I didn't know the filters are available in any view by 'right-click' How cool is that !!! I'll have a look @ the url as well. Many thanks !!!!

  5. #5
    FL0XN0X is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Location
    Belgium
    Posts
    84
    June7,

    When I'm in Design View for Forms, sometimes I do have this 'Excel-like' cell-grid where I can drag & drop Textboxes or any control into this 'Excel-like' cell-grid, but on other Forms in Design View, I do not have this 'Excel-like' grid. What setting enables this 'Excel-like' cell grid?
    Thank you in advance

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    You should probably attach screenshot of what you describe because I have no idea what 'Excel-like' cell-grid you could be talking about.
    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.

  7. #7
    FL0XN0X is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Location
    Belgium
    Posts
    84
    Hi,

    Here's the screenshot

    When I select 1 control, it seems to be part of a 'group' of controls (1st picture shows a 4-arrow icon in the top left corner). Then I can drag and drop additional controls to this 'group' as showed in the 2nd picture where I drag 'n drop a new control in the 'Excel-like grid' in position row1 column3 sort of speech
    Click image for larger version. 

Name:	Excel like grid.png 
Views:	13 
Size:	8.4 KB 
ID:	32797

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Yes, design wizards create controls in a layout group. I normally don't use wizards. But when I do see this I always ungroup the layout. Select all the controls (can left click and sweep), hover cursor over one of the selected controls, right click > Layout > remove layout. Can create layout groups same way.

    I am not able to drag and drop additional controls into the group. The new control just sits on top but is not part of the group.
    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.

  9. #9
    FL0XN0X is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Location
    Belgium
    Posts
    84
    Hey June7,

    You can drag and drop it by moving to the position you want to drop the control. In the screenshot I have sent, I moved the control to the end of the layout group. Theere a 'pink' line will occurs (as indicated in the screenshot) where I can drop the control

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Okay, got it work. However, I never use layout groups anyway.
    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: 10
    Last Post: 02-22-2018, 07:08 PM
  2. Some kind of Crosstab Query (part2)
    By FL0XN0X in forum Access
    Replies: 3
    Last Post: 02-18-2018, 04:13 AM
  3. Replies: 8
    Last Post: 10-26-2014, 10:56 AM
  4. Replies: 2
    Last Post: 10-02-2012, 03:18 PM
  5. Replies: 2
    Last Post: 08-17-2011, 03:02 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