I have tables and forms setup but I have 3 general questions on how to finish the project.
1. Should I create a folder where all the files reside for instance, create a phone log folder, put the DB file into the folder and export XML's into the same folder?
2. How do I get the form to launch as a self-contained form without the Access application in the background?
3. How can I get this form and table to automatically update an XML spreadsheet whenever records are added?
4. How can I get the form to sort all records according to time logged? The time will be entered in manually and we need all the records to sort automatically by time in ascending order.
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 am using the now() function in my date_added field. My site is GMT based but my server is in the US and is returning the date added as 6 hours before which does not look good on the site ...
Is there a way to add 6 hours when the timestamp is being added ?( now() +6hrs ) for example...
Or can I add 6 hours to a time stamp on read back? If so how can I add this in clasic asp?
Hi, I am trying to figure out a way to keep record of store hours, and days open for lots of different restaurants. The only thing I could up with is the following. I'm not sure how to keep track of store hours, or even the best way to make a table for hours. Any help is appreciated, thanks.
I've searched and searched to no avail to find the answer, hopefully you can help.
The story is:
At work, our holidays are now taken as hours off. For example...if I take a Monday off, its 8hrs and 5 min and a Monday morning would be 4hrs and 5 min...What I want to do is calculate how many hours I have taken off throughout the year.
The way I was going to do it was:
Create Table called Times,
Fields = Week, Day, Morning, Afternoon, Friday and 1hour all Data Type "Date/Time"
Similar field names Wk, Days, Morn etc. They would be Data Type "Number"
Now in my simple head, I thought I could simply record how many weeks or days off i had off. Then create a query (for example) Week*Wk to calculate the amount of hours I had off. In simple terms if I had 2 weeks and 2 days off, the query would multiply Week (37) by Wk (2) and Day (8:05) by Days (2), giving a total of 90 hrs and 10 min.
I know there is a datatype mismatch, but is there a way round this.
I have a query in which I need to display just the data that was entered from 9:00 p.m. the previous day until now. There is a date/time field called "QtyTime".
I have an access table, and there is a field called user_time. Once a user record has been inserted, it puts a timestamp on this field, to record the date/time the record was saved to the database.
Now I need to write a query to check if it has been 72 hours since the insertion of the user into the database. This will exclude weekends. If a record was inserted on a Friday, on Monday it will not be 72 hours, as weekends are not taken into account only weekdays. So Monday will only be 24 hours since the user was added.
Hi, I have been looking for some answear, but haven't find the proper one!! I have a form containing a number of records showing the hours worked in format HH.MM at the end of the form I have the sum of the hours, but the result is not correct. To make it simple to understand, actualy the total of hous for 11.55 and 11.14 gives me the result of 22.69 but the correct result should be 23.09 (23h and 09m and not 22h and 59m) How can I get the right total??? Marco
Looking to have a time field that a user can enter how long they worked an issue. Format should be ##:##, but I'm afraid that if I use text, calculations will be impossible. How does someone do this if it's expected that the value will frequently go over 24 hours?
Hello. I have this continous forms which gets data from a query. The query has a field that sums date(hours), and I want them to show more them 24, for example, 42:30.
If I use general number it shows something like 1.2303256 and if I use short date it show something like 02:00 for 26 hours.
If I use a simple code is shows the SAME value in ALL the continuos form.
Which code should I put at the forms field so it would work, that is, it shows a diferent short date in ALL the continous form?
I have fields that are time formated 99/99/99" "00:00;0;_ and I want to subtract them.
I need to get the results in two forms; first in Days and second in Hours. I have used the obvious subtract one from the other and it gives me days in a rounded numbeer, but the hours is not working out.:confused: