DevastatioN
Registered User.
- Local time
- Today, 18:29
- Joined
- Nov 21, 2007
- Messages
- 242
Just curious how many others go about building databases this way, and if they notice any slowdowns due to excessive code.
In regards to form states (form in edit mode, add mode etc.). I run code in the OnCurrent event that checks if the current record is a new record, if it is then "Save" and "Cancel" buttons become visible and the "Close" button becomes invisible. This allows a user to specify when they no longer want the record to be added, or when it's approved to be saved (this is also where I check for required fields etc.).
If there is a current record, then Save/Cancel go away and only a "Close" button is visible which simply closes the form. I control users greatly as access knowledge in my office is very limited, so I make full use buttons and coding, so no X in the top right corner of forms etc.
In regards to user access, we have strict policies for who can access what in our systems. I create a user table and a bunch of Yes/No fields for visible options. Whenever a form is opened, code runs that checks the current user, opens a recordset of their rights, and depending on values will hide and unhide or lock and unlock certain fields and options.
I would imagine this is pretty common practice depending on security restrictions in databases, or are there other ways most go about this? For example, I guess I could create a whole new form for new records, and viewing records, but then any update to one form visually has to be applied exactly to the other forms.
For those who do something similar, do you ever notice any slowdowns based on this amount of code being run? I do find slowdowns can occur when there are 5 or more users in the system, but I believe it's mostly due to our poor network drive performance, as even systems without excessive code can take just as long.
Just curious what other people do to control form states and restricted user access.
In regards to form states (form in edit mode, add mode etc.). I run code in the OnCurrent event that checks if the current record is a new record, if it is then "Save" and "Cancel" buttons become visible and the "Close" button becomes invisible. This allows a user to specify when they no longer want the record to be added, or when it's approved to be saved (this is also where I check for required fields etc.).
If there is a current record, then Save/Cancel go away and only a "Close" button is visible which simply closes the form. I control users greatly as access knowledge in my office is very limited, so I make full use buttons and coding, so no X in the top right corner of forms etc.
In regards to user access, we have strict policies for who can access what in our systems. I create a user table and a bunch of Yes/No fields for visible options. Whenever a form is opened, code runs that checks the current user, opens a recordset of their rights, and depending on values will hide and unhide or lock and unlock certain fields and options.
I would imagine this is pretty common practice depending on security restrictions in databases, or are there other ways most go about this? For example, I guess I could create a whole new form for new records, and viewing records, but then any update to one form visually has to be applied exactly to the other forms.
For those who do something similar, do you ever notice any slowdowns based on this amount of code being run? I do find slowdowns can occur when there are 5 or more users in the system, but I believe it's mostly due to our poor network drive performance, as even systems without excessive code can take just as long.
Just curious what other people do to control form states and restricted user access.