Hi all, I am creating tables in SQL view in Acess, Have managed to create the tables, but am having a little trouble understanding what to do next?
I have an INSERT statement to add names, addresses etc, but cant seem to get it to work.
I am trying to insert into the SQL view in queries, thats where i have created the tables.
Should i use the same querie view or another one, or simply imput the information manually.
INSERT INTO Student ( Student_No, Name, Address, Tel_No, Course_No ) SELECT 'A001', 'Jones B', '12 New Road', '469006', 'HNC34'; this is the statment that i am trying to use:
Im trying to calculate two feilds sounds easy right. My numbers are stored 0000003000 and 0000002000 the feilds are Price and price two in trying to caluclate these but what im gettign is 00000030000000002000 how can i either check to add only numbers or add them and get 0000005000
All rite i get it..i guess i became the joke of the week..hehe..u guys must having a blast laughing at me...well yea i should do my work on my own then get help..
however i managed to do the tables but now i am stuck....only have few hours left..
Any idea why i can't do the relationship to none of the table... it gives me error
the relationship works fine when its
Enforce Referential Integrity is enabled, Cascade Delete Enabled
when Cascade Update is also enabled then i get
"Invalid field definition 'Itemnumberid' in definition of index or relationship." for all the table "Invalid field definition 'Itemnumberid' in definition of index or relationship." for all the table
How do i implant the followings ... i just don't get it how to ue it in acess
BUSINESS RULES • Structural Constraints • Derived Facts: • Hotel total = hotel rate/night * # of nights reserved. • Vehicle total = rental rate/day * # of days rented. • Reservation total = hotel total + vehicle total + cruise rate + flight rate • Operational Constraints • A person may make a reservation only if he/she is over 18. • A person may make a car reservation only if he/she is over 21 and holds a valid driver’s license. • A person making a flight reservation to certain Island, can only pick up a car, or book a hotel, etc, to that certain Island
I have two queries . one to list the data for the current month and the for the pervious month which I used to get a union query. From the union query I created another query which I had put in the report_open as a query def.
It works perfectly well on small databases upto 50 mb but when tested with 70mb databases ,report tabkes 30 minutes to execute and also throws the error"query is too complex"
please advise how I can avoid this error and also speed up the report. Thanks in advance.
the code under report_open looks like this
Dim MyWorkspace As WorkSpace, MyDB As Database, MyQuery As QueryDef Dim MySet As Recordset Dim psSql As String Dim inputno As Integer
Set MyWorkspace = DBEngine.Workspaces(0) Set MyDB = MyWorkspace.Databases(0) inputno = store
I have upto 10 queries which in turn produces 10 reports. Each query has a 'current_year' parameter input by user. Storing 'current_year' value in table and accessing it in queries was an option which was discarded because of the possibility of inner queries using 'current_year' value from a table could slow down the query.
Is there any way to set parameter values for 10 queries in a single stretch. In all the queries parameter name is the same.
Here is a sample query. CURRENT_YEAR is the parameter ===================================
SELECT "1. Candidates in full time Education in Government Schools" as CAPTION,
(SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR ) AS CURRENT_TOTAL,
(SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR AND C_P='S' AND CENTRE <= 'BW835' ) AS CURRENT_NUM, Round(CURRENT_NUM*100/CURRENT_TOTAL,2) AS CURRENT_NUM_PERCENT,
(SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR - 1 ) AS CURRENT_MINUS1_TOTAL, (SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR - 1 AND C_P='S' AND CENTRE <= 'BW835') AS CURRENT_MINUS1_NUM, Round(CURRENT_MINUS1_NUM*100/CURRENT_MINUS1_TOTAL,2) AS CURRENT_MINUS1_NUM_PERCENT,
(SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR - 2 ) AS CURRENT_MINUS2_TOTAL, (SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR - 2 AND C_P='S' AND CENTRE <= 'BW835') AS CURRENT_MINUS2_NUM, Round(CURRENT_MINUS2_NUM*100/CURRENT_MINUS2_TOTAL,2) AS CURRENT_MINUS2_NUM_PERCENT,
(SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR - 3 ) AS CURRENT_MINUS3_TOTAL, (SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR - 3 AND C_P='S' AND CENTRE <= 'BW835') AS CURRENT_MINUS3_NUM, Round(CURRENT_MINUS3_NUM*100/CURRENT_MINUS3_TOTAL,2) AS CURRENT_MINUS3_NUM_PERCENT,
(SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR - 4 ) AS CURRENT_MINUS4_TOTAL, (SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR - 4 AND C_P='S' AND CENTRE <= 'BW835') AS CURRENT_MINUS4_NUM, Round(CURRENT_MINUS4_NUM*100/CURRENT_MINUS4_TOTAL,2) AS CURRENT_MINUS4_NUM_PERCENT,
(SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR - 5 ) AS CURRENT_MINUS5_TOTAL, (SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR - 5 AND C_P='S' AND CENTRE <= 'BW835') AS CURRENT_MINUS5_NUM,
Round(CURRENT_MINUS5_NUM*100/CURRENT_MINUS5_TOTAL,2) AS CURRENT_MINUS5_NUM_PERCENT, ROUND(CURRENT_NUM_PERCENT-CURRENT_MINUS1_NUM_PERCENT,2) AS DIFFERENCE1, ROUND(CURRENT_MINUS1_NUM_PERCENT-CURRENT_MINUS2_NUM_PERCENT,2) AS DIFFERENCE2, ROUND(CURRENT_MINUS2_NUM_PERCENT-CURRENT_MINUS3_NUM_PERCENT,2) AS DIFFERENCE3, ROUND(CURRENT_MINUS3_NUM_PERCENT-CURRENT_MINUS4_NUM_PERCENT,2) AS DIFFERENCE4, ROUND(CURRENT_MINUS4_NUM_PERCENT-CURRENT_MINUS5_NUM_PERCENT,2) AS DIFFERENCE5
FROM MERGED_TABLE AS A WHERE YEAR In (CURRENT_YEAR)
I have upto 10 queries which in turn produces 10 reports. Each query has a 'current_year' parameter input by user. Storing 'current_year' value in table and accessing it in queries was an option which was discarded because of the possibility of inner queries using 'current_year' value from a table could slow down the query.
Is there any way to set parameter values for 10 queries in a single stretch. In all the queries parameter name is the same.
Here is a sample query. CURRENT_YEAR is the parameter ===================================
SELECT "1. Candidates in full time Education in Government Schools" as CAPTION,
(SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR ) AS CURRENT_TOTAL,
(SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR AND C_P='S' AND CENTRE <= 'BW835' ) AS CURRENT_NUM, Round(CURRENT_NUM*100/CURRENT_TOTAL,2) AS CURRENT_NUM_PERCENT,
(SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR - 1 ) AS CURRENT_MINUS1_TOTAL, (SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR - 1 AND C_P='S' AND CENTRE <= 'BW835') AS CURRENT_MINUS1_NUM, Round(CURRENT_MINUS1_NUM*100/CURRENT_MINUS1_TOTAL,2) AS CURRENT_MINUS1_NUM_PERCENT,
(SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR - 2 ) AS CURRENT_MINUS2_TOTAL, (SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR - 2 AND C_P='S' AND CENTRE <= 'BW835') AS CURRENT_MINUS2_NUM, Round(CURRENT_MINUS2_NUM*100/CURRENT_MINUS2_TOTAL,2) AS CURRENT_MINUS2_NUM_PERCENT,
(SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR - 3 ) AS CURRENT_MINUS3_TOTAL, (SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR - 3 AND C_P='S' AND CENTRE <= 'BW835') AS CURRENT_MINUS3_NUM, Round(CURRENT_MINUS3_NUM*100/CURRENT_MINUS3_TOTAL,2) AS CURRENT_MINUS3_NUM_PERCENT,
(SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR - 4 ) AS CURRENT_MINUS4_TOTAL, (SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR - 4 AND C_P='S' AND CENTRE <= 'BW835') AS CURRENT_MINUS4_NUM, Round(CURRENT_MINUS4_NUM*100/CURRENT_MINUS4_TOTAL,2) AS CURRENT_MINUS4_NUM_PERCENT,
(SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR - 5 ) AS CURRENT_MINUS5_TOTAL, (SELECT COUNT(CAND) FROM MERGED_TABLE C WHERE C.YEAR = CURRENT_YEAR - 5 AND C_P='S' AND CENTRE <= 'BW835') AS CURRENT_MINUS5_NUM,
Round(CURRENT_MINUS5_NUM*100/CURRENT_MINUS5_TOTAL,2) AS CURRENT_MINUS5_NUM_PERCENT, ROUND(CURRENT_NUM_PERCENT-CURRENT_MINUS1_NUM_PERCENT,2) AS DIFFERENCE1, ROUND(CURRENT_MINUS1_NUM_PERCENT-CURRENT_MINUS2_NUM_PERCENT,2) AS DIFFERENCE2, ROUND(CURRENT_MINUS2_NUM_PERCENT-CURRENT_MINUS3_NUM_PERCENT,2) AS DIFFERENCE3, ROUND(CURRENT_MINUS3_NUM_PERCENT-CURRENT_MINUS4_NUM_PERCENT,2) AS DIFFERENCE4, ROUND(CURRENT_MINUS4_NUM_PERCENT-CURRENT_MINUS5_NUM_PERCENT,2) AS DIFFERENCE5
FROM MERGED_TABLE AS A WHERE YEAR In (CURRENT_YEAR)
I've just started using 2003 and had a query give me incomplete results. One table contains 6 numbers stored as text joined to the corresponding code in the data set table. Both fields are formatted as text. When using the table as criteria I do not get all of the expected records, I had to type in("1000", "2000",...) in order to retrieve all of my data.
Any ideas on what could be happening?
I use the text setting to avoid problems importing the data set which begins life as a csv file.
I have query , which has got 2 outer joins. The query is:
SELECT A.Project_ID, A.Title, A.comm1 AS Comments, A.Partner AS PM, A.Staff_Assigned AS TL, A.Contact_Name AS FL, A.MD, A.Status, A.Project_Type, ISNULL(B.Delivered_Date, B.Delivery_Date) AS Start_Date, ISNULL(C.Delivered_Date, C.Delivery_Date) AS End_Date FROM dbo.PROJECT A LEFT OUTER JOIN dbo.PROJDATE B ON A.Project_ID = B.Project_ID AND B.Date_Type = "Start Date" LEFT OUTER JOIN dbo.PROJDATE C ON A.Project_ID = C.Project_ID AND C.Date_Type = "End Date"
Can anybody help me out the error with this. I get an error : at dbo.PROJDATE B ON A.Project_ID = B.Project_ID AND B.Date_Type = "Start Date" .
Do I need to use any parantheris or change anthing.
Strange problem, i'm using XP Pro and Access from Office 2003 (both real full versions from work) - and in general use, when the mouse hovers over the 'print' icon (at the top left, undernear file, edit, view, insert, near 'save', 'new', etc), then access will hang for about 20 seconds then snap back into action.
Now, i don't even want to print anything! But every now and again i accidentally hover over it and it's bugging the hell out of me. Everything is updated (but i will check again now).
Anyone know how to make this stop? I tried a quick search but didn't get far.
I've read and gone though quite a few of the scrips and examples for creating logins and security and i'm getting to the stage when i need to have good understanding of the different methods.
Some of the examples whilst create a user login do not really allow for security within the database whilst the build in security wizard would appear to offer that functionality.
I am thinking that I will use the Workgroup file and that method. My question is am i able to utilise the fact that if a person 'AdamA' logs onto the database which is built into the workgroup security file. am I then able to take 'AdamA' to populate a table which records actions by a user? (I can't seem to find any thread or book reference to doing this)
Is it possible to do this through vba. If security is setup for all the tables and a user goes in and creates a new table, can that table have security applied to it using code?
So maybe the creator of the table has read/write privileges but everyone else only has read only.
:confused: I can't access my database. I used many tools to scan my database password, and I had many results but I can't used any one. This's my database. Can you help me?
I am experimenting in creating security of a database, and elements within.
I started by creating a user account with a password. I then made a few mistakes, so wanted to delete the mdb, and start again.
However, when I now try to create a new database, or even open a pre existing database, I am asked for the user and password created in the now-deleted mdb.
Apart from the fact that it shouldn't ask for the user name and pasword created in the first database, I am sure it doesn't accept the password I intered in creating the account.
The easy solution would be to delete the file where Access stores user accounts. Where is it, and is it protected, such that I can't delete it? And even if the user name and password still exists somewhere, it should only apply to the database in which it was created, shouldn't it?
Just looking for a little advice on data protection. I have a split database which is accessed from the front end (forms only). All data is stored on the back end, which is hidden away from the user.
The database is password protected, and both sides use a login authentication to avoid unwanted access. However, the usernames and passwords are easily retrievable by opening the database a text document.
After I created it, the shortcut is created on the screen. Everytime needs to click the shortcut to login it.
But, when I go to database file, and then click it, it does not work, it will show the following message:
You do not have the necessary permissions to use the <name> object. Have your system administrator or the person who created this object establish the appropriate permissions for you. (Error 3033) You do not have the necessary permissions for the specified object. To change your permission assignments, see your system administrator or the object's creator.
So, is it ony the shortcut to login it? if delete the shortcut uncarefully, how to do it??
Problem 1: I setup a security, stored the security file and other files in the drive D:
it works.
after I move the files to the drive C:, then it doesn't work.
Why it doesn't work?
Problem 2: After I created security, there are acc.mdb, acc.bak, and Secured files, right. how can I add this link: "C:Program FilesMicrosoft OfficeOffice10MSACCESS.EXE" "D:acc.mdb" /WRKGRP "D:Secured.mdw" in the target to the acc.mdb file.
Because when it doesn't work, and then I created a shortcut of the acc.mdb file, then add the above code. Then it works, it give out the prompt.
Does any method instead of this, better than this?
I am trying to set up a database in which the the table portion is password protected but the query section can be manipulated or updated as users see fit. Does anyone know how to do this?
I have now finished my system that will run on a windows network. I now need to get the security setup so different users can access different pages.
I have set a list of users and specified what forms/tables they can access. The problem is, how does access know who is accessing the pages? For example, i have set 2 users - Dave G & Dave S - I have given Dave G access to the admin forms as he is the admin and I have given Dave S access to the general data input forms.
How is this enforced? How does access know which person is opening the forms. Unless access asks the user to login using their user name set in access, I cannot see how it can manage what users can do what.
I have locked down my welding data base and had some problems arise mabe someone eles has had this problem. All of the tables in other data base that are linked to the welding data base now will not allow me to utilize them I get the error message that I do not have rights too that information. Even though I have full access rights to the welding data base and can make changes at will.
We have a few access databases in a network. More and more people in our organization are using the databases so I am learning to create some user-level security.
We have access 2000.
Access links to a WIF to create user-level security.
But I think there is an easy way that anyone can get pass that.
Even if I have set all the groups and users privileges and restrictions, anyone can simply switch from one WIF to another WIF, then they would have changed all their privileges and restrictions.
Am I understanding this correctly?
If so, what can I do better secure the database.
Another question: How can I prevent someone from simply copy/delete the access file from windows? I am afraid that someone, maybe a disgruntled employee or even myself making stupid mistakes, delete the whole access .mdb file, and I would loss everything.
I do backup the file, but even if I back it up every night, if something like this happens, i would have lost a whole day of work.
I followed the security wizard and everything worked fine. However, when I move the database to another computer or another folder, it prints this message:
'You don't have the necessary permission to use (path)...'