A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Datasheet Row Access



 
 
Thread Tools Display Modes
  #1  
Old October 3rd, 2005, 04:51 PM
Charles
external usenet poster
 
Posts: n/a
Default 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  
Old October 3rd, 2005, 05:02 PM
SusanV
external usenet poster
 
Posts: n/a
Default

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  
Old October 3rd, 2005, 08:39 PM
Charles
external usenet poster
 
Posts: n/a
Default

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  
Old October 3rd, 2005, 11:26 PM
John Vinson
external usenet poster
 
Posts: n/a
Default

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  
Old October 4th, 2005, 11:54 AM
Charles
external usenet poster
 
Posts: n/a
Default

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  
Old October 4th, 2005, 12:53 PM
SusanV
external usenet poster
 
Posts: n/a
Default

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  
Old October 4th, 2005, 01:57 PM
Charles
external usenet poster
 
Posts: n/a
Default

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  
Old October 4th, 2005, 02:01 PM
SusanV
external usenet poster
 
Posts: n/a
Default

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  
Old October 4th, 2005, 02:12 PM
Charles
external usenet poster
 
Posts: n/a
Default

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  
Old October 4th, 2005, 02:18 PM
SusanV
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 01:56 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.