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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

A record problem



 
 
Thread Tools Display Modes
  #1  
Old March 23rd, 2010, 01:31 PM posted to microsoft.public.access
ericb
external usenet poster
 
Posts: 76
Default A record problem

I have a table with the following fields :

Username as text
Password as text
allowA as yes/no
allowB as yes/no
allowC as yes/no
....
allowX as yes/no


I want to allow a user to edit a record and I want the procedure to go like
this :

1- create a record template
2- copy the selected record into the template
3- edit the template
4- when finished ask to confirm the changes
5- update the table with the values in the template
6- end

Finally my question, how do I make in VB the template (if that is the
correct word).

The rest I can do, but I can't make that "template" or recordset.

How to ?

Thank you for the help
--
Eric
  #2  
Old March 23rd, 2010, 02:37 PM posted to microsoft.public.access
Tedmi
external usenet poster
 
Posts: 141
Default A record problem

First of all, you are "committing spreadsheet" by using repeating "allow..."
fields in each record. If your allowables increase, then you must redo all
your procedures that handle this data. What you need is this:

Table User
Username
Password

Table Action
ActionID (Autonumber or other unique identifier
ActionDesc (text describing what is allowed)

Table UserAllow
UserName
ActionID
(primary compound key on UserName and AllowID)

This is a classic many-to-many relation: A user may be allowed many actions,
and an action may be allowed to many users. If a user is allowed multiple
actions, there are multiple records in UserAllow for that user. Unallowed
things are indicated by a *lack* of a record with that AllowID for a user.

What you need is called a form. It should display the information for one
user, showing all of his/her allowed actions in a listbox. Another listbox
should show all of the actions which are *not* allowed to this user. Write
code for the (say) double-click event of each list box to move actions from
one to the other. So if the user clicks on an item in the "not allowed"
list, that item moves to the "allowed" list, and vice-versa. Upon activating
the updating of the table, all of the user's existing action records are
deleted from the UserAllow table, and new ones are created from the form's
allowed list.

Good luck
-TedMi

"ericb" wrote in message
...
I have a table with the following fields :

Username as text
Password as text
allowA as yes/no
allowB as yes/no
allowC as yes/no
...
allowX as yes/no


I want to allow a user to edit a record and I want the procedure to go
like
this :

1- create a record template
2- copy the selected record into the template
3- edit the template
4- when finished ask to confirm the changes
5- update the table with the values in the template
6- end

Finally my question, how do I make in VB the template (if that is the
correct word).

The rest I can do, but I can't make that "template" or recordset.

How to ?

Thank you for the help
--
Eric



  #3  
Old March 23rd, 2010, 03:25 PM posted to microsoft.public.access
ericb
external usenet poster
 
Posts: 76
Default A record problem

I will clear up my objective. Those fields "AllowA, ..." are referred to by
callback functions of the ribbon.

This form that I want to make is used by the administrator that allows a
particular User to use such and such Tab and/or control groups.

I want to copy the present settings into a record template give him the
chance of changing thing around and then to put the new settings back into
the UserTable after he conformed everything.

It is the template part I have problems with.

How to make one ?

--
Eric


"TedMi" wrote:

First of all, you are "committing spreadsheet" by using repeating "allow..."
fields in each record. If your allowables increase, then you must redo all
your procedures that handle this data. What you need is this:

Table User
Username
Password

Table Action
ActionID (Autonumber or other unique identifier
ActionDesc (text describing what is allowed)

Table UserAllow
UserName
ActionID
(primary compound key on UserName and AllowID)

This is a classic many-to-many relation: A user may be allowed many actions,
and an action may be allowed to many users. If a user is allowed multiple
actions, there are multiple records in UserAllow for that user. Unallowed
things are indicated by a *lack* of a record with that AllowID for a user.

What you need is called a form. It should display the information for one
user, showing all of his/her allowed actions in a listbox. Another listbox
should show all of the actions which are *not* allowed to this user. Write
code for the (say) double-click event of each list box to move actions from
one to the other. So if the user clicks on an item in the "not allowed"
list, that item moves to the "allowed" list, and vice-versa. Upon activating
the updating of the table, all of the user's existing action records are
deleted from the UserAllow table, and new ones are created from the form's
allowed list.

Good luck
-TedMi

"ericb" wrote in message
...
I have a table with the following fields :

Username as text
Password as text
allowA as yes/no
allowB as yes/no
allowC as yes/no
...
allowX as yes/no


I want to allow a user to edit a record and I want the procedure to go
like
this :

1- create a record template
2- copy the selected record into the template
3- edit the template
4- when finished ask to confirm the changes
5- update the table with the values in the template
6- end

Finally my question, how do I make in VB the template (if that is the
correct word).

The rest I can do, but I can't make that "template" or recordset.

How to ?

Thank you for the help
--
Eric



.

  #4  
Old March 23rd, 2010, 08:14 PM posted to microsoft.public.access
Tedmi
external usenet poster
 
Posts: 141
Default A record problem

The solution you have attempted is not suitable for Access. You have two
choices to do this correctly: implement a truly relational data structure in
the Access relational database, or go to a spreadsheet which will allow you
to freely edit multiple repeating fields in each row.
-TedMi

"ericb" wrote in message
...
I will clear up my objective. Those fields "AllowA, ..." are referred to
by
callback functions of the ribbon.

This form that I want to make is used by the administrator that allows a
particular User to use such and such Tab and/or control groups.

I want to copy the present settings into a record template give him the
chance of changing thing around and then to put the new settings back into
the UserTable after he conformed everything.

It is the template part I have problems with.

How to make one ?

--
Eric


"TedMi" wrote:

First of all, you are "committing spreadsheet" by using repeating
"allow..."
fields in each record. If your allowables increase, then you must redo
all
your procedures that handle this data. What you need is this:

Table User
Username
Password

Table Action
ActionID (Autonumber or other unique identifier
ActionDesc (text describing what is allowed)

Table UserAllow
UserName
ActionID
(primary compound key on UserName and AllowID)

This is a classic many-to-many relation: A user may be allowed many
actions,
and an action may be allowed to many users. If a user is allowed multiple
actions, there are multiple records in UserAllow for that user. Unallowed
things are indicated by a *lack* of a record with that AllowID for a
user.

What you need is called a form. It should display the information for one
user, showing all of his/her allowed actions in a listbox. Another
listbox
should show all of the actions which are *not* allowed to this user.
Write
code for the (say) double-click event of each list box to move actions
from
one to the other. So if the user clicks on an item in the "not allowed"
list, that item moves to the "allowed" list, and vice-versa. Upon
activating
the updating of the table, all of the user's existing action records are
deleted from the UserAllow table, and new ones are created from the
form's
allowed list.

Good luck
-TedMi

"ericb" wrote in message
...
I have a table with the following fields :

Username as text
Password as text
allowA as yes/no
allowB as yes/no
allowC as yes/no
...
allowX as yes/no


I want to allow a user to edit a record and I want the procedure to go
like
this :

1- create a record template
2- copy the selected record into the template
3- edit the template
4- when finished ask to confirm the changes
5- update the table with the values in the template
6- end

Finally my question, how do I make in VB the template (if that is the
correct word).

The rest I can do, but I can't make that "template" or recordset.

How to ?

Thank you for the help
--
Eric



.



 




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


All times are GMT +1. The time now is 09:25 PM.


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