473,396 Members | 1,971 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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
Nov 13 '05 #1
4 2526
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Jim | last post by:
Hi, Let me explain how I'd generally do things. For a page where the user edits data, I'd generally call it something like editfred.php (for example), the page which updates the data would be...
2
by: Stan | last post by:
This is how I access Pieces field in my editable datargid during Update event: protected void grdMain_OnUpdate(Object sender, DataGridCommandEventArgs e) { string Pieces = ((TextBox)...
2
by: Gary | last post by:
Hello All, I have an editable data grid in my web form, this grid allows the user to add new records, edit existing records and also delete them. When a user adds a record the grid goes in to...
3
by: Damon Grieves | last post by:
Hi I have a large table which I wanted to filter and then edit the selected record. I'm using a form with several pull down fields linked to lookup tables which correspond to fields in the large...
2
by: hazz | last post by:
Given the update query UPDATE Columns SET Include_in_Report = @Include_in_Report WHERE (ID = @Original_ID); Include_In_Report is a bit field in the table, represented as a...
2
by: Roy | last post by:
Hey all, This is a general question. Here's my scenario: We have a legacy database. The core table within contains almost 4 million records in SQL Server. Currently we have a web front end which...
1
by: cyningeston | last post by:
OS: WinXP Pro, VB/ASP/ADO.NET I'm building a web-based supplier management application. For each supplier we are required by the FDA to track certain documents. I've managed to pull them from...
9
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the...
2
by: =?Utf-8?B?Z2FuZQ==?= | last post by:
Hi, In a gridview, How can i display different columns between item and edit modes. For eg. i have a sql that returns productname, categoryname, etc. In viewmode, i need to display only...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.