Crosstab query based form data update

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jackjee
    New Member
    • Dec 2020
    • 24

    Crosstab query based form data update

    Hi
    I have a continuous form based on crosstab query results. The fields in the form is from the crosstab column headings.
    I am looking for updating the records directly from the form such as on click of that item in the record need to be updated from a pop up/or values placed on the form header (as textbox or command buttons)
    The structure of the record is like below

    The column headings are such as Date, Apple, Orange, Mango
    Date Apple Orange Mango
    2001-01-22 12x 15d 9g
    2001-01-23 6t 24g 12x
    2001-01-24 22a 12e 7g

    I am trying to update the value of any of the items (eg. 12x in Apple column to change as something else) what is the possible solution? I can place the new values in textbox or command buttons and click of this textbox/command button should change the value in the current field. Hope this is possible. Please guide me to right direction
  • isladogs
    Recognized Expert Moderator Contributor
    • Jul 2007
    • 483

    #2
    Crosstab queries are read only. Forms based on them are also read only so you cannot edit the values.

    You have two choices:
    1. Edit the data in the underlying the table instead (using a form)
    2. Create a make table query based on the crosstab. Use that to populate your form which will then be editable.
    After editing you will need to update the original table with the new data

    I have used both methods. Method 2 takes more work for you as the developer.
    However, it does mean your form will then behave like an editable crosstab query.
    If done well, response will be fast and end users will not realise what you did to make it work

    Comment

    Working...