By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,664 Members | 1,999 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,664 IT Pros & Developers. It's quick & easy.

How to edit a non editable field ??

P: n/a
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
Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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" <ja*****************@gmail.com> wrote in message
news:89**************************@posting.google.c om...
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

Nov 13 '05 #2

P: n/a
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 strRecordSourceDicc As String

Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.fPALABRA_4.ControlSource = "Expr1"
End Sub


Private Sub Form_Open(Cancel As Integer)


strRecordSourceDicc = "SELECT tblESP_RUS_PALABRAS.ID,
tblESP_RUS_PALABRAS.NIVEL, tblESP_RUS_PALABRAS.CONOZCO, " _
& "tblESP_RUS_PALABRAS.CASTELLANO, funDecrypt([CASTELLANO]) AS Expr1,
tblESP_RUS_PALABRAS.RUSO, " _
& "funDecrypt([RUSO]) AS Expr2, tblESP_RUS_NIVEL.DESCRIPCION_ES,
tblESP_RUS_NIVEL.DESCRIPCION_RU FROM " _
& "tblESP_RUS_NIVEL INNER JOIN tblESP_RUS_PALABRAS ON
tblESP_RUS_NIVEL.NIVEL = " _
& "tblESP_RUS_PALABRAS.NIVEL;"

Me.RecordSource = strRecordSourceDicc
Me.fPALABRA_4.ControlSource = "Expr1"
Me.fPALABRA_5.ControlSource = "Expr2"

End Sub

Private Sub fPALABRA_4_AfterUpdate()

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

End Sub

Private Sub fPALABRA_4_Click()
' Me.fPALABRA_4.ControlSource = "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" <co***************************@hotmail.com> wrote in message news:<gd****************@newssvr30.news.prodigy.co m>...
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" <ja*****************@gmail.com> wrote in message
news:89**************************@posting.google.c om...
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

Nov 13 '05 #3

P: n/a
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.txtUnboundTextbox = MyDecryptRoutine(Me.txtMyHiddenTextbox)

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.txtMyHiddenTextbox = MyEncryptRoutine(Me.txtUnboundTextbox)

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.txtUnboundTextbox = MyDecryptRoutine(Me.txtMyHiddenTextbox)

--
Wayne Morgan
MS Access MVP
"Javier Gomez" <ja*****************@gmail.com> wrote in message
news:89*************************@posting.google.co m...
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 strRecordSourceDicc As String

Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.fPALABRA_4.ControlSource = "Expr1"
End Sub


Private Sub Form_Open(Cancel As Integer)


strRecordSourceDicc = "SELECT tblESP_RUS_PALABRAS.ID,
tblESP_RUS_PALABRAS.NIVEL, tblESP_RUS_PALABRAS.CONOZCO, " _
& "tblESP_RUS_PALABRAS.CASTELLANO, funDecrypt([CASTELLANO]) AS Expr1,
tblESP_RUS_PALABRAS.RUSO, " _
& "funDecrypt([RUSO]) AS Expr2, tblESP_RUS_NIVEL.DESCRIPCION_ES,
tblESP_RUS_NIVEL.DESCRIPCION_RU FROM " _
& "tblESP_RUS_NIVEL INNER JOIN tblESP_RUS_PALABRAS ON
tblESP_RUS_NIVEL.NIVEL = " _
& "tblESP_RUS_PALABRAS.NIVEL;"

Me.RecordSource = strRecordSourceDicc
Me.fPALABRA_4.ControlSource = "Expr1"
Me.fPALABRA_5.ControlSource = "Expr2"

End Sub

Private Sub fPALABRA_4_AfterUpdate()

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

End Sub

Private Sub fPALABRA_4_Click()
' Me.fPALABRA_4.ControlSource = "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 :-((

Nov 13 '05 #4

P: n/a
Thank you Wayne !!

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

best regrds

Javier

"Wayne Morgan" <co***************************@hotmail.com> wrote in message news:<tm****************@newssvr12.news.prodigy.co m>...
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.txtUnboundTextbox = MyDecryptRoutine(Me.txtMyHiddenTextbox)

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.txtMyHiddenTextbox = MyEncryptRoutine(Me.txtUnboundTextbox)

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.txtUnboundTextbox = MyDecryptRoutine(Me.txtMyHiddenTextbox)

--
Wayne Morgan
MS Access MVP
"Javier Gomez" <ja*****************@gmail.com> wrote in message
news:89*************************@posting.google.co m...
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 strRecordSourceDicc As String

Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.fPALABRA_4.ControlSource = "Expr1"
End Sub


Private Sub Form_Open(Cancel As Integer)


strRecordSourceDicc = "SELECT tblESP_RUS_PALABRAS.ID,
tblESP_RUS_PALABRAS.NIVEL, tblESP_RUS_PALABRAS.CONOZCO, " _
& "tblESP_RUS_PALABRAS.CASTELLANO, funDecrypt([CASTELLANO]) AS Expr1,
tblESP_RUS_PALABRAS.RUSO, " _
& "funDecrypt([RUSO]) AS Expr2, tblESP_RUS_NIVEL.DESCRIPCION_ES,
tblESP_RUS_NIVEL.DESCRIPCION_RU FROM " _
& "tblESP_RUS_NIVEL INNER JOIN tblESP_RUS_PALABRAS ON
tblESP_RUS_NIVEL.NIVEL = " _
& "tblESP_RUS_PALABRAS.NIVEL;"

Me.RecordSource = strRecordSourceDicc
Me.fPALABRA_4.ControlSource = "Expr1"
Me.fPALABRA_5.ControlSource = "Expr2"

End Sub

Private Sub fPALABRA_4_AfterUpdate()

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

End Sub

Private Sub fPALABRA_4_Click()
' Me.fPALABRA_4.ControlSource = "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 :-((

Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.