Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best Practice

Status
Not open for further replies.

eveCalypso

Programmer
Apr 29, 2003
134
GB
Good Day,

I have been asked to write a system in Access. I am quite familiar and comfortable with the DB design etc as well as VBA, but now that I am planning my user interface - I see that I have ideas which I am not sure:
1) can be done/used
2) is best practise for Access

I would appreciate some advice plus your patience as I work through this project.

Firstly, I need and have designed a logon screen.
What I would like to do on the "Login" button, is
a) check against the database that this is indeed a valid
user and
b) select the user's name off my table for display on
subsequent forms

As far as I can see, there are many ways to interrogate the DB thru Access - pre-defined queries, code within the code builder, Modules (?) and Macros.
Which method(s) do you most commonly use to extract, query and or generally communicate with the database from within your forms? I might be doing more complex things later on, but I want to start off doing things in a standard way.
Recommendations?

On a sidenote, how would you best keep global variables (such as my user's real name) for the duration of the application's life?

Let's leave it at this for the moment!
Regards,
EvE
 
Eve:

I would suggest implementing Access User Level Security. This will address both of your issues.

You can create groups which define what level of permissions the user has and you can pull the user's name.

On a networked system you can use [CurrentUser] to identify the individual or you can acquire the name from the security file. I don't use the latter method so I can't offer any guidance on that.

HTH

Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
Firstly it depends on what exactly you wish to do, as to which is best (code, query etc). In most cases, I try to use a query to get the required data, but this is not always possible.

Secondly on global variables, I create a small table for these called "gvars", and when the database is opened a delete query clears this table out, and my logon screen then fills it (via an append query) with the static data.

[pc]

Graham
 
Good Afternoon,

Thank you for your replies.
Sounds like there is no standard way - oh dear!

I am unfamiliar with "Access User Level Security" - is it a module or add-in?
The main reason why I want users to log in is because I want to keep the user who modified or inserted a record in my database PLUS display their name on screen.

If there are any more ideas I can follow up on, please let me know.

Best Regards,
EvE
 
Thank you
I am going to have a look at it now!

Regards,
EvE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top