How to edit a non editable field ??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Javier Gomez

    How to edit a non editable field ??

    I have a query field which is a non editable field because is a
    function's result.

    Due to I need to edit the information, Can you please suggest me any
    solution for this problem??
    (No matter which one)

    I tryed to duplicate this field , (copying into a new temporally
    field) but no success....... continues non editable field :-(((

    Thank you !
    Javier Gomez
  • Wayne Morgan

    #2
    Re: How to edit a non editable field ??

    To edit a calculate field, you need to edit the fields that make up the
    calculation or change the calculation so that it returns the correct result.

    Can you give a better explanation of what you're trying to do and why?

    --
    Wayne Morgan
    MS Access MVP


    "Javier Gomez" <javier.gomez.e scuer@gmail.com > wrote in message
    news:89a886e9.0 504040621.7642d 753@posting.goo gle.com...[color=blue]
    >I have a query field which is a non editable field because is a
    > function's result.
    >
    > Due to I need to edit the information, Can you please suggest me any
    > solution for this problem??
    > (No matter which one)
    >
    > I tryed to duplicate this field , (copying into a new temporally
    > field) but no success....... continues non editable field :-(((
    >
    > Thank you !
    > Javier Gomez[/color]


    Comment

    • Javier Gomez

      #3
      Re: How to edit a non editable field ??

      First of all, thanks for answering me!

      Ok I will try my best to explain it:

      1-I have several tables linked to a DB.

      2-The information of 2 fields in each 6 Tables is encrypted by an
      encryption function. (DB module)

      3-When I open "the Form" using the encrypted data table's I have the
      following problem:

      A-When I use a text box with the Decrypt function then I can read the
      data normally (legible field) , but the text box is not editable. I
      need to modify the data, to add data or delete data. So here is the
      problem.!

      B-When I do not use de Decrypt function then I can modify them, add
      and delete data, but I can not understand the encrypted fields (non
      legible fields I mean) Here is the second problem. !


      Now I'm trying to change the Me.RecordSource "before update even" and
      "after Update even" also working with "on current even" , I tried with
      many deferent combinations, but unfortunately so far I did Not find
      any good solution !!

      My FORM SAMPLE is as follows:

      ‘+++++++ START CODE +++++++++
      Option Compare Database
      Option Explicit

      Dim strRecordSource Dicc As String

      Private Sub Form_BeforeUpda te(Cancel As Integer)
      Me.fPALABRA_4.C ontrolSource = "Expr1"
      End Sub




      Private Sub Form_Open(Cance l As Integer)




      strRecordSource Dicc = "SELECT tblESP_RUS_PALA BRAS.ID,
      tblESP_RUS_PALA BRAS.NIVEL, tblESP_RUS_PALA BRAS.CONOZCO, " _
      & "tblESP_RUS_PAL ABRAS.CASTELLAN O, funDecrypt([CASTELLANO]) AS Expr1,
      tblESP_RUS_PALA BRAS.RUSO, " _
      & "funDecrypt ([RUSO]) AS Expr2, tblESP_RUS_NIVE L.DESCRIPCION_E S,
      tblESP_RUS_NIVE L.DESCRIPCION_R U FROM " _
      & "tblESP_RUS_NIV EL INNER JOIN tblESP_RUS_PALA BRAS ON
      tblESP_RUS_NIVE L.NIVEL = " _
      & "tblESP_RUS_PAL ABRAS.NIVEL;"

      Me.RecordSource = strRecordSource Dicc
      Me.fPALABRA_4.C ontrolSource = "Expr1"
      Me.fPALABRA_5.C ontrolSource = "Expr2"

      End Sub



      Private Sub fPALABRA_4_Afte rUpdate()

      [CASTELLANO] = funEnCrypt([CASTELLANO])
      Me.RecordSource = strRecordSource Dicc
      Requery
      Refresh

      End Sub

      Private Sub fPALABRA_4_Clic k()


      ' Me.fPALABRA_4.C ontrolSource = "CASTELLANO "
      [CASTELLANO] = fPALABRA_4


      End Sub

      ‘+++++++END CODE++++++++


      4- You can try with any encrypt function or decrypt function (this
      does not make any deference) is same effect in the TEXT BOXES.
      5-first TextBox names is fPALABRA_4
      Second textbox name is fPALABRA_5


      6-The form is a continuous form !!

      7-My code sample is working,…………… but Not as it should :-((


      So,…….. What Can I do ???
      I need your help

      Regards
      Javier Gomez





      "Wayne Morgan" <comprev_gothro ughthenewsgroup @hotmail.com> wrote in message news:<gdc4e.137 2$gF5.495@newss vr30.news.prodi gy.com>...[color=blue]
      > To edit a calculate field, you need to edit the fields that make up the
      > calculation or change the calculation so that it returns the correct result.
      >
      > Can you give a better explanation of what you're trying to do and why?
      >
      > --
      > Wayne Morgan
      > MS Access MVP
      >
      >
      > "Javier Gomez" <javier.gomez.e scuer@gmail.com > wrote in message
      > news:89a886e9.0 504040621.7642d 753@posting.goo gle.com...[color=green]
      > >I have a query field which is a non editable field because is a
      > > function's result.
      > >
      > > Due to I need to edit the information, Can you please suggest me any
      > > solution for this problem??
      > > (No matter which one)
      > >
      > > I tryed to duplicate this field , (copying into a new temporally
      > > field) but no success....... continues non editable field :-(((
      > >
      > > Thank you !
      > > Javier Gomez[/color][/color]

      Comment

      • Wayne Morgan

        #4
        Re: How to edit a non editable field ??

        Ok, see if this will work.

        1) Place a hidden textbox on the form and bind that textbox to the encrypted
        field. Leave the Control Source for the textbox you currently have blank
        (unbound textbox).

        2) In the form's Current event get the encrypted value from the hidden
        textbox, decrypt it, and place the value in the current textbox.

        Example:
        Me.txtUnboundTe xtbox = MyDecryptRoutin e(Me.txtMyHidde nTextbox)

        3) In the AfterUpdate event of the current textbox, get the value of the
        current textbox, encrypt it, and place the value in the hidden textbox. When
        the record is saved, this value in the hidden textbox will be saved.

        Example:
        Me.txtMyHiddenT extbox = MyEncryptRoutin e(Me.txtUnbound Textbox)

        4) Pressing Esc while editing the unbound textbox will undo the changes in
        the unbound textbox, but pressing Esc twice to undo all the changes to the
        record after you've left the unbound textbox won't undo the unbound textbox.
        However, it will undo the hidden, bound textbox. So, in the form's Undo
        event, you will also need to decrypt the value and place it in the unbound
        textbox.

        Example:
        Me.txtUnboundTe xtbox = MyDecryptRoutin e(Me.txtMyHidde nTextbox)

        --
        Wayne Morgan
        MS Access MVP


        "Javier Gomez" <javier.gomez.e scuer@gmail.com > wrote in message
        news:89a886e9.0 504051233.ee0c1 93@posting.goog le.com...[color=blue]
        > First of all, thanks for answering me!
        >
        > Ok I will try my best to explain it:
        >
        > 1-I have several tables linked to a DB.
        >
        > 2-The information of 2 fields in each 6 Tables is encrypted by an
        > encryption function. (DB module)
        >
        > 3-When I open "the Form" using the encrypted data table's I have the
        > following problem:
        >
        > A-When I use a text box with the Decrypt function then I can read the
        > data normally (legible field) , but the text box is not editable. I
        > need to modify the data, to add data or delete data. So here is the
        > problem.!
        >
        > B-When I do not use de Decrypt function then I can modify them, add
        > and delete data, but I can not understand the encrypted fields (non
        > legible fields I mean) Here is the second problem. !
        >
        >
        > Now I'm trying to change the Me.RecordSource "before update even" and
        > "after Update even" also working with "on current even" , I tried with
        > many deferent combinations, but unfortunately so far I did Not find
        > any good solution !!
        >
        > My FORM SAMPLE is as follows:
        >
        > '+++++++ START CODE +++++++++
        > Option Compare Database
        > Option Explicit
        >
        > Dim strRecordSource Dicc As String
        >
        > Private Sub Form_BeforeUpda te(Cancel As Integer)
        > Me.fPALABRA_4.C ontrolSource = "Expr1"
        > End Sub
        >
        >
        >
        >
        > Private Sub Form_Open(Cance l As Integer)
        >
        >
        >
        >
        > strRecordSource Dicc = "SELECT tblESP_RUS_PALA BRAS.ID,
        > tblESP_RUS_PALA BRAS.NIVEL, tblESP_RUS_PALA BRAS.CONOZCO, " _
        > & "tblESP_RUS_PAL ABRAS.CASTELLAN O, funDecrypt([CASTELLANO]) AS Expr1,
        > tblESP_RUS_PALA BRAS.RUSO, " _
        > & "funDecrypt ([RUSO]) AS Expr2, tblESP_RUS_NIVE L.DESCRIPCION_E S,
        > tblESP_RUS_NIVE L.DESCRIPCION_R U FROM " _
        > & "tblESP_RUS_NIV EL INNER JOIN tblESP_RUS_PALA BRAS ON
        > tblESP_RUS_NIVE L.NIVEL = " _
        > & "tblESP_RUS_PAL ABRAS.NIVEL;"
        >
        > Me.RecordSource = strRecordSource Dicc
        > Me.fPALABRA_4.C ontrolSource = "Expr1"
        > Me.fPALABRA_5.C ontrolSource = "Expr2"
        >
        > End Sub
        >
        >
        >
        > Private Sub fPALABRA_4_Afte rUpdate()
        >
        > [CASTELLANO] = funEnCrypt([CASTELLANO])
        > Me.RecordSource = strRecordSource Dicc
        > Requery
        > Refresh
        >
        > End Sub
        >
        > Private Sub fPALABRA_4_Clic k()
        >
        >
        > ' Me.fPALABRA_4.C ontrolSource = "CASTELLANO "
        > [CASTELLANO] = fPALABRA_4
        >
        >
        > End Sub
        >
        > '+++++++END CODE++++++++
        >
        >
        > 4- You can try with any encrypt function or decrypt function (this
        > does not make any deference) is same effect in the TEXT BOXES.
        > 5-first TextBox names is fPALABRA_4
        > Second textbox name is fPALABRA_5
        >
        >
        > 6-The form is a continuous form !!
        >
        > 7-My code sample is working,..... but Not as it should :-(([/color]


        Comment

        • Javier Gomez

          #5
          Re: How to edit a non editable field ??

          Thank you Wayne !!

          Ok perfect !!
          Very kind from you !!
          You help me a lot !!

          best regrds

          Javier





          "Wayne Morgan" <comprev_gothro ughthenewsgroup @hotmail.com> wrote in message news:<tmF4e.213 2$3z3.988@newss vr12.news.prodi gy.com>...[color=blue]
          > Ok, see if this will work.
          >
          > 1) Place a hidden textbox on the form and bind that textbox to the encrypted
          > field. Leave the Control Source for the textbox you currently have blank
          > (unbound textbox).
          >
          > 2) In the form's Current event get the encrypted value from the hidden
          > textbox, decrypt it, and place the value in the current textbox.
          >
          > Example:
          > Me.txtUnboundTe xtbox = MyDecryptRoutin e(Me.txtMyHidde nTextbox)
          >
          > 3) In the AfterUpdate event of the current textbox, get the value of the
          > current textbox, encrypt it, and place the value in the hidden textbox. When
          > the record is saved, this value in the hidden textbox will be saved.
          >
          > Example:
          > Me.txtMyHiddenT extbox = MyEncryptRoutin e(Me.txtUnbound Textbox)
          >
          > 4) Pressing Esc while editing the unbound textbox will undo the changes in
          > the unbound textbox, but pressing Esc twice to undo all the changes to the
          > record after you've left the unbound textbox won't undo the unbound textbox.
          > However, it will undo the hidden, bound textbox. So, in the form's Undo
          > event, you will also need to decrypt the value and place it in the unbound
          > textbox.
          >
          > Example:
          > Me.txtUnboundTe xtbox = MyDecryptRoutin e(Me.txtMyHidde nTextbox)
          >
          > --
          > Wayne Morgan
          > MS Access MVP
          >
          >
          > "Javier Gomez" <javier.gomez.e scuer@gmail.com > wrote in message
          > news:89a886e9.0 504051233.ee0c1 93@posting.goog le.com...[color=green]
          > > First of all, thanks for answering me!
          > >
          > > Ok I will try my best to explain it:
          > >
          > > 1-I have several tables linked to a DB.
          > >
          > > 2-The information of 2 fields in each 6 Tables is encrypted by an
          > > encryption function. (DB module)
          > >
          > > 3-When I open "the Form" using the encrypted data table's I have the
          > > following problem:
          > >
          > > A-When I use a text box with the Decrypt function then I can read the
          > > data normally (legible field) , but the text box is not editable. I
          > > need to modify the data, to add data or delete data. So here is the
          > > problem.!
          > >
          > > B-When I do not use de Decrypt function then I can modify them, add
          > > and delete data, but I can not understand the encrypted fields (non
          > > legible fields I mean) Here is the second problem. !
          > >
          > >
          > > Now I'm trying to change the Me.RecordSource "before update even" and
          > > "after Update even" also working with "on current even" , I tried with
          > > many deferent combinations, but unfortunately so far I did Not find
          > > any good solution !!
          > >
          > > My FORM SAMPLE is as follows:
          > >
          > > '+++++++ START CODE +++++++++
          > > Option Compare Database
          > > Option Explicit
          > >
          > > Dim strRecordSource Dicc As String
          > >
          > > Private Sub Form_BeforeUpda te(Cancel As Integer)
          > > Me.fPALABRA_4.C ontrolSource = "Expr1"
          > > End Sub
          > >
          > >
          > >
          > >
          > > Private Sub Form_Open(Cance l As Integer)
          > >
          > >
          > >
          > >
          > > strRecordSource Dicc = "SELECT tblESP_RUS_PALA BRAS.ID,
          > > tblESP_RUS_PALA BRAS.NIVEL, tblESP_RUS_PALA BRAS.CONOZCO, " _
          > > & "tblESP_RUS_PAL ABRAS.CASTELLAN O, funDecrypt([CASTELLANO]) AS Expr1,
          > > tblESP_RUS_PALA BRAS.RUSO, " _
          > > & "funDecrypt ([RUSO]) AS Expr2, tblESP_RUS_NIVE L.DESCRIPCION_E S,
          > > tblESP_RUS_NIVE L.DESCRIPCION_R U FROM " _
          > > & "tblESP_RUS_NIV EL INNER JOIN tblESP_RUS_PALA BRAS ON
          > > tblESP_RUS_NIVE L.NIVEL = " _
          > > & "tblESP_RUS_PAL ABRAS.NIVEL;"
          > >
          > > Me.RecordSource = strRecordSource Dicc
          > > Me.fPALABRA_4.C ontrolSource = "Expr1"
          > > Me.fPALABRA_5.C ontrolSource = "Expr2"
          > >
          > > End Sub
          > >
          > >
          > >
          > > Private Sub fPALABRA_4_Afte rUpdate()
          > >
          > > [CASTELLANO] = funEnCrypt([CASTELLANO])
          > > Me.RecordSource = strRecordSource Dicc
          > > Requery
          > > Refresh
          > >
          > > End Sub
          > >
          > > Private Sub fPALABRA_4_Clic k()
          > >
          > >
          > > ' Me.fPALABRA_4.C ontrolSource = "CASTELLANO "
          > > [CASTELLANO] = fPALABRA_4
          > >
          > >
          > > End Sub
          > >
          > > '+++++++END CODE++++++++
          > >
          > >
          > > 4- You can try with any encrypt function or decrypt function (this
          > > does not make any deference) is same effect in the TEXT BOXES.
          > > 5-first TextBox names is fPALABRA_4
          > > Second textbox name is fPALABRA_5
          > >
          > >
          > > 6-The form is a continuous form !!
          > >
          > > 7-My code sample is working,..... but Not as it should :-(([/color][/color]

          Comment

          Working...