If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Datasheet Row Access
I have a Access 2003 datasheet and I want to lock all fields in the first
few number of rows, but I do NOT wnat to lock all rows in the datasheet. Can I do this and if so how does on enumerate datasheet rows? Thank in advance Charles |
#2
|
|||
|
|||
Hi Charles,
Using a datasheet you aren't going to be able to do this - and besides, it'[s bad practice to give users direct access to tables. Better to set up a continuous form (which looks like a datasheet to your users) so that you can lock fields or records based on control contents. -- hth, SusanV "Charles" wrote in message ... I have a Access 2003 datasheet and I want to lock all fields in the first few number of rows, but I do NOT wnat to lock all rows in the datasheet. Can I do this and if so how does on enumerate datasheet rows? Thank in advance Charles |
#3
|
|||
|
|||
Thank you Susan for your response,
However even with a continuous form the question remains... how do I enumerate the rows and lock certain rows (fields on the row) and then move on to the next. How do I enumerate the rows CL "SusanV" wrote in message ... Hi Charles, Using a datasheet you aren't going to be able to do this - and besides, it'[s bad practice to give users direct access to tables. Better to set up a continuous form (which looks like a datasheet to your users) so that you can lock fields or records based on control contents. -- hth, SusanV "Charles" wrote in message ... I have a Access 2003 datasheet and I want to lock all fields in the first few number of rows, but I do NOT wnat to lock all rows in the datasheet. Can I do this and if so how does on enumerate datasheet rows? Thank in advance Charles |
#4
|
|||
|
|||
On Mon, 3 Oct 2005 14:39:42 -0500, "Charles"
wrote: Thank you Susan for your response, However even with a continuous form the question remains... how do I enumerate the rows and lock certain rows (fields on the row) and then move on to the next. How do I enumerate the rows A table HAS NO ORDER. Talking about the first five rows in a table is like talking about the first five potatoes in a wheelbarrow... g You'll need *some* field in the table to indicate which rows are to be protected; in the Form's Current event you can check the value of that field and set the Form's AllowUpdates property appropriately. John W. Vinson[MVP] |
#5
|
|||
|
|||
Gee John,
I am not talking about a table. I am talking about rows on a continuous form. How do I advance from one row to the next row. I will test the neccessary criteria as I need to but can I enumerate the continuous forms rows. CL "John Vinson" wrote in message ... On Mon, 3 Oct 2005 14:39:42 -0500, "Charles" wrote: Thank you Susan for your response, However even with a continuous form the question remains... how do I enumerate the rows and lock certain rows (fields on the row) and then move on to the next. How do I enumerate the rows A table HAS NO ORDER. Talking about the first five rows in a table is like talking about the first five potatoes in a wheelbarrow... g You'll need *some* field in the table to indicate which rows are to be protected; in the Form's Current event you can check the value of that field and set the Form's AllowUpdates property appropriately. John W. Vinson[MVP] |
#6
|
|||
|
|||
You could do it this way. Might not be the sleekest but it would work.
Add a yes/no field to the table. Loop through a recordset of the table, using IF your condition is met, THEN set fldLock = -1, ELSE fldLock = 0. On the form, IF fldLock = -1, THEN me.FirstName.Locked = true me.LastName.locked = true etc etc. Else me.FirstName.Locked = false me.LastName.locked = false etc etc. Endif -- hth, SusanV "Charles" wrote in message ... Gee John, I am not talking about a table. I am talking about rows on a continuous form. How do I advance from one row to the next row. I will test the neccessary criteria as I need to but can I enumerate the continuous forms rows. CL "John Vinson" wrote in message ... On Mon, 3 Oct 2005 14:39:42 -0500, "Charles" wrote: Thank you Susan for your response, However even with a continuous form the question remains... how do I enumerate the rows and lock certain rows (fields on the row) and then move on to the next. How do I enumerate the rows A table HAS NO ORDER. Talking about the first five rows in a table is like talking about the first five potatoes in a wheelbarrow... g You'll need *some* field in the table to indicate which rows are to be protected; in the Form's Current event you can check the value of that field and set the Form's AllowUpdates property appropriately. John W. Vinson[MVP] |
#7
|
|||
|
|||
Thanks again Susan,
I understand your solution but do not want to add database fields whose function is to help with input edits. I beleive I will look for a third party datasheet solution Thank you Charles "SusanV" wrote in message ... You could do it this way. Might not be the sleekest but it would work. Add a yes/no field to the table. Loop through a recordset of the table, using IF your condition is met, THEN set fldLock = -1, ELSE fldLock = 0. On the form, IF fldLock = -1, THEN me.FirstName.Locked = true me.LastName.locked = true etc etc. Else me.FirstName.Locked = false me.LastName.locked = false etc etc. Endif -- hth, SusanV "Charles" wrote in message ... Gee John, I am not talking about a table. I am talking about rows on a continuous form. How do I advance from one row to the next row. I will test the neccessary criteria as I need to but can I enumerate the continuous forms rows. CL "John Vinson" wrote in message ... On Mon, 3 Oct 2005 14:39:42 -0500, "Charles" wrote: Thank you Susan for your response, However even with a continuous form the question remains... how do I enumerate the rows and lock certain rows (fields on the row) and then move on to the next. How do I enumerate the rows A table HAS NO ORDER. Talking about the first five rows in a table is like talking about the first five potatoes in a wheelbarrow... g You'll need *some* field in the table to indicate which rows are to be protected; in the Form's Current event you can check the value of that field and set the Form's AllowUpdates property appropriately. John W. Vinson[MVP] |
#8
|
|||
|
|||
Best of luck,
Susan "Charles" wrote in message ... Thanks again Susan, I understand your solution but do not want to add database fields whose function is to help with input edits. I beleive I will look for a third party datasheet solution Thank you Charles "SusanV" wrote in message ... You could do it this way. Might not be the sleekest but it would work. Add a yes/no field to the table. Loop through a recordset of the table, using IF your condition is met, THEN set fldLock = -1, ELSE fldLock = 0. On the form, IF fldLock = -1, THEN me.FirstName.Locked = true me.LastName.locked = true etc etc. Else me.FirstName.Locked = false me.LastName.locked = false etc etc. Endif -- hth, SusanV "Charles" wrote in message ... Gee John, I am not talking about a table. I am talking about rows on a continuous form. How do I advance from one row to the next row. I will test the neccessary criteria as I need to but can I enumerate the continuous forms rows. CL "John Vinson" wrote in message ... On Mon, 3 Oct 2005 14:39:42 -0500, "Charles" wrote: Thank you Susan for your response, However even with a continuous form the question remains... how do I enumerate the rows and lock certain rows (fields on the row) and then move on to the next. How do I enumerate the rows A table HAS NO ORDER. Talking about the first five rows in a table is like talking about the first five potatoes in a wheelbarrow... g You'll need *some* field in the table to indicate which rows are to be protected; in the Form's Current event you can check the value of that field and set the Form's AllowUpdates property appropriately. John W. Vinson[MVP] |
#9
|
|||
|
|||
In looking more closely at the solution you suggested it appears to me that
when I set me.FirstName.Locked = true That it would set the colume to locked for every row of the form. Is there an event that you had in mind in which to put this code and have it address only a sinbgle row? CL "SusanV" wrote in message ... Best of luck, Susan "Charles" wrote in message ... Thanks again Susan, I understand your solution but do not want to add database fields whose function is to help with input edits. I beleive I will look for a third party datasheet solution Thank you Charles "SusanV" wrote in message ... You could do it this way. Might not be the sleekest but it would work. Add a yes/no field to the table. Loop through a recordset of the table, using IF your condition is met, THEN set fldLock = -1, ELSE fldLock = 0. On the form, IF fldLock = -1, THEN me.FirstName.Locked = true me.LastName.locked = true etc etc. Else me.FirstName.Locked = false me.LastName.locked = false etc etc. Endif -- hth, SusanV "Charles" wrote in message ... Gee John, I am not talking about a table. I am talking about rows on a continuous form. How do I advance from one row to the next row. I will test the neccessary criteria as I need to but can I enumerate the continuous forms rows. CL "John Vinson" wrote in message ... On Mon, 3 Oct 2005 14:39:42 -0500, "Charles" wrote: Thank you Susan for your response, However even with a continuous form the question remains... how do I enumerate the rows and lock certain rows (fields on the row) and then move on to the next. How do I enumerate the rows A table HAS NO ORDER. Talking about the first five rows in a table is like talking about the first five potatoes in a wheelbarrow... g You'll need *some* field in the table to indicate which rows are to be protected; in the Form's Current event you can check the value of that field and set the Form's AllowUpdates property appropriately. John W. Vinson[MVP] |
#10
|
|||
|
|||
Oh, jeez I forgot this was a continuous form - not sure how you could
accomplish this on a row by row basis. May I ask what your purpose is with this? Wouldn't it be simpler to filter your recordsource to 2 separate datasets - one which would be view-only and one which would open in an editing form? Susan "Charles" wrote in message ... In looking more closely at the solution you suggested it appears to me that when I set me.FirstName.Locked = true That it would set the colume to locked for every row of the form. Is there an event that you had in mind in which to put this code and have it address only a sinbgle row? CL "SusanV" wrote in message ... Best of luck, Susan "Charles" wrote in message ... Thanks again Susan, I understand your solution but do not want to add database fields whose function is to help with input edits. I beleive I will look for a third party datasheet solution Thank you Charles "SusanV" wrote in message ... You could do it this way. Might not be the sleekest but it would work. Add a yes/no field to the table. Loop through a recordset of the table, using IF your condition is met, THEN set fldLock = -1, ELSE fldLock = 0. On the form, IF fldLock = -1, THEN me.FirstName.Locked = true me.LastName.locked = true etc etc. Else me.FirstName.Locked = false me.LastName.locked = false etc etc. Endif -- hth, SusanV "Charles" wrote in message ... Gee John, I am not talking about a table. I am talking about rows on a continuous form. How do I advance from one row to the next row. I will test the neccessary criteria as I need to but can I enumerate the continuous forms rows. CL "John Vinson" wrote in message ... On Mon, 3 Oct 2005 14:39:42 -0500, "Charles" wrote: Thank you Susan for your response, However even with a continuous form the question remains... how do I enumerate the rows and lock certain rows (fields on the row) and then move on to the next. How do I enumerate the rows A table HAS NO ORDER. Talking about the first five rows in a table is like talking about the first five potatoes in a wheelbarrow... g You'll need *some* field in the table to indicate which rows are to be protected; in the Form's Current event you can check the value of that field and set the Form's AllowUpdates property appropriately. John W. Vinson[MVP] |
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
The "Right" web hosting for data access pages?? | Ron Ehrlich | General Discussion | 9 | May 6th, 2005 05:49 AM |
Why is a French Spellchecker a "required" update for English speak | French Spellcheck Required? | General Discussion | 23 | April 26th, 2005 01:17 AM |
Encrypt AccesS File? | milest | General Discussion | 2 | February 9th, 2005 07:58 PM |
Images in a database | Franz | General Discussion | 10 | October 7th, 2004 09:35 AM |
Adding staff photographs to my database | KK | New Users | 2 | September 3rd, 2004 07:41 AM |