Accessing Table Based On User Privaleges

Jun 28, 2006

This is my problem, i am new to asp and dreamweaver. Yet i have no knowlege source to refer on. all i have learned is through trial and error.

What i am trying to do is create a log for 15 dept. Each dept has their own log which is represented in the database as tables.

I want to make only 10 pages. not the 150 asp pages that i will have to do unless i can get any help.

What i want is that when someone logs in, based on a variable in their userdata that it will display the log from the correct table.

If anyone can help i would greatly appreciate it. i have racked my brain for weeks...

View Replies


ADVERTISEMENT

Limit User From Accessing A Specific Form

Jan 11, 2008

I am having a problem restricting a user from a certain form.
I have a module that detects if a user or admin based on the roles entered in the employees table.

If their windows login is not listed in the employees table, they will not be able to view any of the forms.

Here's my problem, I want the users to access the switchboard, but they should not be able to get into the reporting button.

here's my code:
If LOAStatusbtn.Caption = "View Report" _
And Not admin _
Then
'useraccess denied because not an admin
error_text = "You do not have privileges to access this screen." & vbCr & "Please contact an administrator"
MsgBox error_text, , "No Privileges"

End If

If they click on LOAStatusbtn and their role is not admin, then a message should pop up.

I searched the forum and could not find anything similar to this.

Thank you,

View 4 Replies View Related

Prevent User From Accessing Navigation Pane

Aug 14, 2015

I'm ready to "publish" my desktop db for end users, however I want to limit their ability to view the objects in the Navigation Pane. Essentially, the only way I want the user to be able to interface with my db is through the forms I have created.

View 1 Replies View Related

General :: One User At A Time - Prevent Multiple Users Accessing The Database

Feb 13, 2015

Twice a year, a database of mine is accessed and put too use by various staff within a time range of 1 week. the database is on a shared drive and in a location which can be accessed by all.

The staff access the database from different workstations and in some instances at the same time.

This has only led to issues in the database being copied and then confusing staff on what database to click on thus i have 2 databases which i then have to sift through and copy/paste into the correct one.

I want to know the best way i can:

1) Prevent multiple users accessing the database at a time.
2) making a copy of the original and typing into a separate database.

View 7 Replies View Related

Export Part Of The Table Based On User Input Via Form

Aug 23, 2006

hi everybody, im have a database with table called "project". there are many column in this table. my user want to export this table to Excel, but only some of column, with particular order ( depend on him) to analyze in Excel.
he asked me to build a form with a list box, drop box,somthing like this, so he can choose what column to export in what order.
i try to make a query like this: " Select Forms!UserInput.combobox1.value , Forms!UserInput.combobox2.value,etc, From Project" but it wont work.
Dou you have any idea.
thanks in advance

View 2 Replies View Related

Modules & VBA :: Update A Table With Dates Based On User Input

Dec 30, 2014

I am new to VBA and I'm trying to write a query that will update a table with dates based on user input. For example a user will run data each Monday and that date will be day01. The date table has 28 days total and I need each day row to update with the next date i.e. day01 is 12/30, day02 is 12/31, day03 is 1/01 etc..I am having issues just running the update the query. I get a too few parameters error message on the strsql statement. There are only two columns in the table, order_day(date column) and date_value(text). I want to update order_day. I also need creating a loop so it knows to go back and add days to the other values.

Here is what I have:

Code:
Sub Update_Dates()
Dim rs As Recordset
Dim db As Database
Dim lmsg As String
Dim transactiondate As Date
Dim strsql As String

[Code] ....

View 6 Replies View Related

Accessing Feilds In A Table

Jan 13, 2006

Ill start from the dawn of time

right all tables are like a 2d array so does any body know how i can access a field in a row of a table ie like in most languages it goes a bit like this ArrayName(1,1) with ArrayName being the name of the table and that access the first field of the first row. im new to Vba and access 2000 but all i want to do is access the fields in a column of a sub-form displayed as a table add them all up and place the answer in a text box on the main form stick all this in a function so i can run it inside a macro

q1 is this possable
q2 how do you do it

thanks in advance john

View 5 Replies View Related

Accessing A Field From A Table

May 17, 2007

Hi!

I'm making a test database for DVD rentals. When A loan is made I have an update query that sets some fields in the DVD copy table. One of these fields needs to be set to the primary key of the loan made. This would be the last entry on the loans table. I don't have any idea what to put in the 'Update To' box in the query though.

Wrong code here, but this may help explain what I am trying to get: Tables.Loans.LastLoan.Loan ID

Also heres an image of my query:
http://i92.photobucket.com/albums/l15/mikegrundel/Accessproblem.png

Help would be much appreciated. Thanks :)

View 3 Replies View Related

Calc User Totals Table 1 And Enter In User Records In Table 2

Oct 28, 2004

I have two tables. The first contains details of a budget holders money allocation for a given period, and the other tracks their spend on products over that period. How can I generate a query to calculate the total running spend for each user from the "budget spend table" that will be written into the users record in the "budget allocation table".

My aim is to show details of budget allocation, total spend to date and remaining budget for each user in an Order form / report.

Can anyone please advise me on how to do this or suggest another way of doing it. Any help would be greatly appreciated.

Thanks in advance.

Regards Peter

View 5 Replies View Related

Problem In Accessing Table Properties

Nov 5, 2005

:rolleyes: hi
i am raza. i am facing a problem while accessing the properties page of access table.
when i gets its properties page it has no properties on it.i have attached the pic wich can explain the problem.
pls tell me if any body can solve this problem.
thanks.
raza

View 6 Replies View Related

Form Accessing Table - Very Slow!!?

Feb 17, 2005

Hi,

I have developed a small database with 3 or 4 forms which works ok on most PC's. But when I put it on a certain PC, it almost works properly except for one form which is very slow accessing the table!
Eg. It could take 2 minutes to use a combobox.

All PC's have Access 2000.
Would there be a reason for this?
Is this an access problem or a PC problem? Are there special settings that I'm unaware of?

Thanks in advance

View 1 Replies View Related

Accessing ID Of Last Record Right After You Insert It Into Table

Apr 13, 2005

Hi folks,
I have an Append Query (Insert Into...) that I use to insert values into a table from a form. But to have that tie into other tables I need to gather the Student_ID (primary key) that is autogenerated when the record is inserted. How do I do this? I want to store it in a public variable. I've done quite a bit of searching but nothing of any value has turned up. Please help.

What I have on button press:
DoCmd.OpenQuery "Register Camp Students"

After that I need something to gather that newly inserted Student_ID and store it for later use. Please help!

Ciao,
jawilli1 :confused:

View 4 Replies View Related

Accessing Information From A Table Record Using Codes....

Jun 19, 2006

Hi all,

I've got this simple thing.. which I couldn't do and stuck for a long long time.. I have done some programming in a few languages, but not in SQL or VBA and I quite confused about programming styles that VBA and SQL accepts.

I'm currently working in Microsoft access and the thing I'm stuck on is retriving field value from a record and writing into another record on the same table.

For example the table "Table-users" looks like the following:

ID Name Year Month Date
1 Steven 1979 9 18
2 Jeremy 1977 10 22
3 Eslynn 1988 10 10

I've built a form that contains two lables (combobox), "ReplaceMe" "LoadMe" and a command button. Which end user could choose which record to load and which to replace.

I wish to copy Year, Month and Date from LoadMe into ReplaceMe without effecting the Replace me ID and Name.

The VBA, SQL code i've got looks like.
-----------------
'Command_Click is the tigger button to active the following code.
Private Sub Command37_Click()

'Below is an example of what I wanted to do field by field. However, in the real
'environment, I needed to move about 20 odd field into another object. I'm not sure
'to use Append or Update Query
Dim UpdateSQL As String
Dim text1 As String
Dim text2 As String
Dim text3 As String

'this loads the string containt-the Name of the object-into text1.
'this line works fine, arr.. other ones don't.......
text1 = Me!ReplaceMe
text2 = Me!LoadMe
'Load the month of the LoadMe.
text3 = Table![Table-users = text2].month

'Loads the SQL instruction into UpdateSQL
'Table-table is a table, containing several objects and fields.
UpdateSQL = "INSERT INTO [Table-users].text1( [Day], [year], [month] ) " & _
"SELECT Table-users.Day, Table-users.year, Table-users.month" & _
"FROM Table-users" & _
"WHERE (((Table-users.Name)='ReplaceMe'));"

DoCmd.RunSQL UpdateSQL

End Sub--------------------
Well the obvious, the above code doesn't run.
If LoadMe = Jeremy, ReplaceMe = Steven, the above code should return:

ID Name Year Month Date
1 Steven 1977 10 22
2 Jeremy 1977 10 22

Making Steve's Year, Month and Date field the same as jeremy

======================

What I think i'm confused about is when do I use [ ] ( ) ! .

Like... if I wanted to read the field value of "Date" from the object from the "Name" in combo box "LoadMe", what should I write?

ie, if the combo box "LoadMe" contains Eslynn. The end result should be 22.

Many thanks

View 2 Replies View Related

Tables :: Accessing Data From Other Fields In Another Table

Sep 19, 2014

I have a database with a number of tables 2 of which are:

# Personal Members Table (with all their details and addresses and contact details)
# Organisation Table (including who are members of this Org)

My conundrum is this; In the Org table I have just created a 'Treasurer' Field and want to choose a name from the Members Table so that I do not have to put the data in twice (which is what has happened in the past.)

I have linked the tables and but within the Members table the Field names for the Personal Name are as follows <FirstName> <LastName> and there is another for the <Org> they are connected with...

In the Members table it would also be good to have the ability to hover the mouse over the <org> field (or click) on it and then underneath a box appears with everyone who is a member of that org. I have seen this working on another database but cannot seem to replicate it here for some reason?

View 6 Replies View Related

Storing And Accessing Word Documents In A Table?

Jul 4, 2015

I have a set of maybe 5 template word docs which I populate with info form our database using bookmarks , the word docs are currently sat in a shared network drive.

I have started wonder if it would be better to store them in a table and call them from there to keep things together.

View 1 Replies View Related

Security - Multiple Users Accessing Part Of A Table

Nov 24, 2006

Hi,

I'm building a DB where I have multiple users. I would like to have all data in 1 table but only give access to records created by the individual user. Is this possible?

Alternatively, if each user has it's own table, how can I report on the sum of all tables.:confused:

Cheers,

Rene

View 5 Replies View Related

How To Run A Report Based On User's Options

Apr 12, 2007

Hello,

I need help with something (i attached a database).
I need to run a report based on user's options so i created a form. There are two comboboxes and 2 checkboxes on the form. If the checkbox is checked i want to consider the choice of the user on the particular combobox. If no, to ignore that column.
The second problem is when the user choose "no choice" i want the query to run for all choices without filtering the combobox.

Any suggestions?

Thank you in advance.

View 1 Replies View Related

Unique Reference Based On PK And User Selection

Nov 10, 2005

Hello,

I am trying to create a unique reference number that includes the default autonumber and another count based on what the user selects from a dropdown (B).

For example, the reference might look something like these examples:

AutoDropdwnADropdwnBCount
001DrinkMocha1
002DrinkEGrey1
003DrinkEspresso1
004DrinkLatte1

005DrinkEGrey2
006DrinkEGrey3
007DrinkEGrey4

008DrinkEspresso2
009DrinkLatte2
010DrinkEspresso3

I will eventually create a unique reference by combining all the data (ie: 004-Drink-Latte-1, 010-Drink-Espresso-3) but it will allow me to number each type of drink in ascending order irrespective of the autonumber (which is the primary key.)

I would appreciate any advice on how to approach this! I am baffled!

Thanks,

dj_T







:eek:

View 2 Replies View Related

Select Query Based On A User Choice

Nov 13, 2006

Hi,

I would like to run a simple select query, where the CRITERIA is based on the user choice.
I have a form with a combo box, with a few choices, and a button that will trigger a macro with one query for now. I can store the choice in to a variable e.g. "town", using Microsoft VB code.
How can I transfer the variable to the CRITERIA field in the query, so whenever I chose a specific "town", my query will select the records for that specific town.
I want to use one query, and I don't want to have to "hard type the criteria in to the cells' query", but I would like to use a variable that can change and will be read it from the user choice through combo box.

If I am not clear enough, please let me know.

Thank you!

View 2 Replies View Related

Forms :: Populate Textbox Based On User Log In

Mar 3, 2014

Code:
Private Sub Check253_AfterUpdate()
If Me.Check253 = -1 Then
Me.Text254 = DLookup("[Lot]", "[tblAutoGen]", "[Inuse] = -1")
Me.Text256 = DLookup("[Exp]", "[tblAutoGen]", "[Inuse] = -1")
Me.Text258 = DLookup("[Lot]", "[tblEthanol]", "[Inuse] = -1")

[Code] ....

I am using the code above on my form and it seems to be working. My question is there a way to populate a textbox (Text255) based off a login?

For example, lets say JSmith is loged in to the computer. Is there a way that JS could populate Text255? If then say JCarter is logged on, the JC populates Text255.

View 1 Replies View Related

General :: User-based Security Disabled

Sep 24, 2012

I have an Access 2003 db being used through Access 2007 in order to use user-based security.It is a spit db with the be being on a shared server.For some reason, the security login has been deactivated after working fine for over a year. The user goes right to the autoexec macro file without having to log in.

They are also getting a "Read-Only" message at the top about only being able change table in linked tables.The DB is configured to utilize the logon as a parameter in some queries.

View 6 Replies View Related

Field Values Based On User Selection In Combo

Dec 9, 2005

Hello,

I'm stuck! I want to create a form which has a combo box where you select
someone's name, and their address appears in another text box on the same form. The names and addresses are in a table called "cardholders".

I'm doing separate combos for first name, surname cos I think that's the only
way you can do it.

The fields in the table are credit_add, credit_name & credit_surname. The combos are called "cardholder name" "cardholder surname" etc. This is the code in the text box where I want the address to appear:-

=DLookUp("[credit_add]","cardholders","[credit_name] = '" & [cardholdername] & "' And [credit_surname] = " & [cardholdersurname])

Can anyone help?

Thanks.

View 3 Replies View Related

Modules & VBA :: Only One Record Yes And Others Revert To No Based On User Selection

Jan 12, 2015

My table has a yes/no field and about 10 records. I have created a form for the user to select which of the records he wishes to use - the records are displayed in a continuous form with a check box for the yes/no field. The user is to select one record by checking the check box in the record.

I know this should be obvious, but I can't see it. How can I make it so the user can only select one of the records (when he clicks on one, that one is yes and the others revert to no?

View 4 Replies View Related

Queries :: Query That Uses Different Columns Based Upon User Input

Sep 10, 2013

I have a database table in which I'm trying to pull sales data and generate sales reports from. The problem I face is that the sales data is recorded into a table with this structure:

Year | Customer | Sales_Month_1 | Sales_Month_2 | Sales_Month_3

Rather than having a single field "Month" in which I could set criteria or prompt the user to select a month to derive sales data from, I need to write a query that through user input (or through some code within the query) the right field will be selected. An example of this would be generating a report for the 1st month of the year, obviously.

View 1 Replies View Related

Queries :: Pulling Comment Based On User Selection?

Sep 17, 2013

I have a tblCommets that has 2 columns in it. The first is an identifier (1,2,3) and the second column is a comment associated with that identifier. Is it possible to use a query to pull that comment based on a user selection? So, if the user selects 1 then the comment associated with 1 is pulled, but if the user selects 2 then that comment results.

Code : =Select[tblComments].Column(2)

View 1 Replies View Related

Forms :: Automatically Fill Field Based On User ID

Jun 30, 2015

I have a table called tbl_post_staff, within this table I have an id number (autonumber), user id (text) and user full name(text). Then I have a form called ec_main with a combobox linked to tbl_post_staff, but stores its value in a field called officer_is in a table called tbl_extensions. also on the ec_main form is a text box that displays current user.

What I am trying to do is; on my form ec_main; default the combobox (Called officeris) to the staff full name based on there userid that is logged in. how can I do this?

View 12 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved