I am trying to create a database (duh!). At the moment, I have two tables. One table is a small timetable with the fields:
Day, Airline, Flight Number, Time, Origin, Destination, Aircraft
The other table (Delay) has the following fields:
Date, Day, Airline, Flight Number, Time, Origin, Destination, Delayed by.
I would like to do the following. In Delay I put in the date: 01/07/2005, fine. The Day (field format Date/Time dddd) is also 01/07/2005 which Access transofrms into the word "Friday". Airilne is BA. In Flight Numbers, I want the database to do a query on "TIMETABLE" to search all flights that operate on a Friday as some do not operate daily. (By the way in the 'Day' column of Timetable the values are "Monday Tuesday Wednesday Thursday Friday Saturday Sunday" or "Monday Thursday Saturday" depending on the flight). This query/lookup should be performed right after I type 01/07/2005 in the "day" field of "Table: Delay". A lookup combo box should be displayed when I arrive at the field FLight Number. I select a flight (e.g.: BA001) and automatically the Time, Origin and Destination of the flight should appear in the "Table: Delay".
I have been unsuccessful at even getting past the first hurdle. I tried a query of the "Table: Timetable" and fields "Day" and "Flight Number". The Criteria I do not know what to put in. "Like [Delay]![Day]" or "[Delay]![Day]" does not help and brings up nothing. However, "Like *Monday*" does bring up all the flights which operate on a Monday. However isn't there some way of telling the query to automatically occur after I type in the relevant day in the "Delay" table? Futhermore I would like to avoid (but not totally exclude if it's impossible) macros as eventually I hope to publish this to SQL or whatever.
The current challenge I have in MS Access in really giving me a headache. I can’t seem to find an answer or indeed think “outside the box” so I am hoping there is someone who can help.
Below I will outline the design of my database, the problem I have and my proposed solution. My solution is “What I want to do” rather than “How I do it”. If you have the time and patience to look at my problem and suggest how I proceed, I will be really grateful.
CURRENT DATABASE DESIGN
I created a database that imports daily telephone data. The design below is a simplified version of the real thing but it contains the essential information needed to understand my database.
I extract data from the phone system for “Lines” (3 digit code) e.g. ‘301’,’302’ which each have a corresponding line “Description” e.g. ‘New Customers’, ‘Accounts Queries’. There are three main daily extracts (1) Inbound Calls (2) Outbound Calls and (3) Time. Each extract has either “Line” or “Description” as the unique identifier but not both.
There are 50 lines with matching descriptions and each is allocated to one of 20 teams. I have a query which links all three extracts, groups the data by team and date. Therefore this query creates 20 records (teams) for each day (date).
CURRENT QUERY AND TABLES
Tbl Line Lookup (50 records) Line Description Team
Tbl Inbound Calls Line Date Offered Calls Answered Calls Abandoned Calls
Tbl Outbound Calls Description Date Outgoing Calls
Tbl Time Description Date Answer Time Abandon Time Talk Time Wrap Up Time
Qry Grouped By Team Daily
Line – linked to line in Tbl Incoming Calls Description – linked to description in both Tbl Outgoing Calls and Tbl Time
Team – Grouped field Date – Grouped filed Offered Calls - Sum Answered Calls - Sum Abandoned Calls - Sum Outgoing Calls - Sum Answer Time - Sum Abandon Time - Sum Talk Time - Sum Wrap Up Time - Sum
PROBLEM
Customer Services “Team” is made up of six lines (301-306) and Business Partners “Team” is made up of three lines (307-309). For each day my query creates a record for each of these teams based on how the line is allocated in Tbl Line Lookup.
The business had decided that line 304 calls are part of the Business Partners with effect from 01/05/06. If I change the team name associated with 304 in Tbl Line Lookup this will, incorrectly, allocate all information (from 01/01/06 to present) to Business Partners.
I need a mechanism to allocate 304 to Customer Services prior to 30/04/06 and to Business Partners after 01/05/06.
PROPOSED SOLUTION
I want to introduce a new field in Tbl Line Lookup called Effective Date.
Tbl Line Lookup (50 records) Line Description Team Effective Date
Then I want to introduce a new query which links the data in the three data tables and allocates the correct team name by comparing the date in these extracts with the effective date in the Tbl Line Lookup.
I would then run my original query (Qry Grouped By Team Daily) over this query instead of the original tables.
Please can someone tell me if it is possible to look up values in another table to determine the value of a field in the way I have described?
Detailed search cannot answer my time problem. Returning after long break in programming, I am trying to create a form to display TimeIn and TimeOut fields such that actioning an OnClick command (or separate tick-box), TimeIn field will hold current time for that record. Need to set the same for a TimeOut field. Both cases time always to be < 24 hours.
Am so rusty on MS Access putting default value as =now() produces an error!! Any basic help to wind up the old mind always appreciated.
Hi: I try to get the value in a real time. There are two subforms inside a mainform. First user enters value into mainform. Than comes to subform1. And after that on the basis of a choice in subform1, the 2nd subform is open. In 2nd subform i create a listbox with that query.
SELECT [tbl_Events].[PPVVOD_Outlet] FROM tbl_Events WHERE [tbl_Events].[ticketnum]=[Forms]![tbl_PPVResearch]![ticketnum];
But it shows empty. [tbl_Events].[PPVVOD_Outlet] is a subform1
Okay, seems like it should be simple... maybe I'm wrong though:
Any one know how to do real-time counting of the number of characters in a text box so that once it reaches 3 it automatically moves to the next text box? (Doing a phone number ... area code (int) and phone (long) to make for a total of 6 bytes.)
I've tried several versions of code for the on-change event but I can't seem to find the right way to assess the number of characters currently in the control... I'm pensive about setting an invisible control to just 'count up' because the on-change event would stack it even with a deletion. See most recent attempt below...
Obrigado, ~Chad
Private Sub txtAreaPhone_Change() Dim bytCount As Byte Dim strAPhone As String
If IsNull(Me.txtAreaPhone) = False Then strAPhone = Cstring(Trim(Abs(Me.txtAreaPhone))) bytCount = Len(strAPhone) If bytCount = 3 Then Me.txtPhone.SetFocus Else End If Else
I have a form which im using to store records about companies that I have mailings with. The company name is my unique field as no two companies should have the same name. This form is accessed by several different people and data is input so I dont want duplicates of the company name being produced. Currently, the form wont save a record if it is duplicated but by then I would have filled out the entire form and wasted my time. Is there a way to do the following:
As I enter the company name it would look up exisitng company names. eg if i wanted to enter a new company called 'Dans Plumbing', I would type 'D' and below the text box would display a load of existing records starting with D. after that when I type 'Da' it would only display records starting with Da and so on. All being well, when I have finished typing the company name there should be nothing underneath so that I instantly know its not a duplicate and vice versa.
The possible duplicate doesn't have to be underneath it could auto complete IN the text box a bit like the address bar on a web browser.
I am trying to display a total based on 3 separate combo boxes in a form. there is a name with an associated number value using 2 fields. the values come from a linked value spreadsheet. the name field is "text" and the number is "number". the user selects their name and number using a combo box drop down window. this occurs 3 times in my form and i want to sum them in a 4th combo box. this is about how it should look, where "Total" happens automatically depending on the name selected.
I would like to create a combo box (or something similiar if a combo box simply can't do it) where the list of choices in the pulldown shows only the matches of what a user types in. The list of choices are coming from a field in a table. Also I would like the "search" of the user's input to include what is "within" each choice, e.g. if a user type "ber", then valid results should be bertha, october, robert.
I have a query in which some of the field names were assigned a while back and don't make a lot of sense to the person who gets the report so I give them new labels in the query...for example:
I pull in the field AE_resp_req and in front of that I type in RM Response: AE_resp_req and when I run the query, the name for the field is RM Response and it works great. I have another field called Category_Rating that I pull into this query and I did the same thing: Exam Rating: Category_Rating (field name) but when I run the query it still says Category_Rating and I get no errors or messages..
Any way I can set a table up with an intrinsic limit, specifically that only ONE record at a time (this will vary) can possibly have value X selected from a lookup field containing assigned values X, Y and Z. Is this possible? If so, how do I do this?
I am trying to create an Access database where I can let the employees enter their time-in and time-out, at the end of their shift. I already created this function working, but running into another issue. Everyday, employees need to enter a break. Sometimes they take a break and sometimes they don't, if they work shorter hours. Thus, the break is not a default 30min and has to be enterd by the employee.
Below is the code I have to calculate the total hour:
txtCalcTime has the below code in control source: =Int([CalcTime]/60) & ":" & Int([CalcTime] Mod 60)
Control source for this form "FrmTimes" property, in which Txtcalctime resides:
QryTimes "QryTimes" query has the code below: SELECT TimeID, TimeIn, TimeOut, Brake, DateID, DateDiff("n",[TimeIn],[TimeOut]) AS CalcTime FROM EmpTimes;
This shows the total number of hours worked. But how can I make it to substract the break time entered by the employee in "txtbreak" on FrmTimes
I have finger print machine and i already connect to it and get all log.then i tray to get data and here is the code that im using
SELECT Format(CHECKINOUT.CHECKTIME,"dd/mm/yyyy") AS CDate, IIf([CHECKINOUT.CHECKTYPE]=I,Format(CHECKINOUT.CHECKTIME,"hh:nn:ss ampm")) AS StartTime, Format(CHECKINOUT.CHECKTIME,"hh:nn:ss ampm") AS EndTime, USERINFO.USERID, USERINFO.Name, CHECKINOUT.CHECKTYPE FROM CHECKINOUT INNER JOIN USERINFO ON CHECKINOUT.USERID=USERINFO.USERID WHERE (((Format([CHECKINOUT].[CHECKTIME],"dd/mm/yyyy"))='10/04/2014'));
I need a Select Query to display data on a form. When an order is appended to my table the field named Printed is updated with the time it was appended. When my form opens it needs to display the field Printed and a field I call MinutesFromPrint. This field needs to display the total minutes elapsed from the time in the Printed field to the current time. My expression is not working.
MinutesFromPrint: DateDiff("n",[Printed],Now())
Here are a couple of samples of my results when I run the query at 7:49 A.M.:
Here's a tricky little problem I am trying to figure out. I'm sure someone out there should be able to help me without breaking anything. Heres the problem.... I have a form that has an underlying table attached. I have a combo box pull in a pull down list of locations from that table. What I would like to happen is, I would like it so the user will select a location from that combo box, and then click a command button. When they click that button, I need whatever they chose in the comobo box to copy over to a NEW table, which will be referenced later by my program. Say the table being pulled from is called "table1", and the table I need the info to go to is "newtable". I guess it doesn't SOUND hard, but I can't seem to figure anything out on it. I'll let you experts tear it apart and tell me how dumb I am for not knowing. Be kind... I'm still a noob. :D
I have been thinking about this since two day and tried everything, but no luck.
I have a form with recordsource a query. A listbox contains all references and if you choose a reference, everything else on the same form gets updated. Now i want to avoid that two users edit the same record at the same time. So i thought i would make an extra field in my table with a checkbox "yes/no" wich says if the record is in use or not. Now whenever a user edits a complaint i want that when another user is trying to edit the same record a message pops up saying that the record is in use. I can get it to work, but only have the problem that when a user decides to change reference number in the listbox and call upon another record, the value needs to get to fals again on the record he was editing.
Maybe there is another way to now if a user is working on a record.
Anyone that can help with an easy solution on this?
I am building an app which will be used to administer a small company which has several mobile service engineers.
Everything is fine. A fairly standard sort of job until the client asked for a screen showing each engineer for a given day with a bar graph showing planned start and finish times for each allocated job, together with the location! As an added challenge, I need the user to be able to click on the "Chart" and so open another screen showing full details of the job clicked on.
My first approach was to use a chart. Couldn't do it:confused:
The approach I have now used is to create a series of labels on the form "On the fly" to represent each job and the unallocated time in between jobs. I can also run a macro to display the full job details when the label is clicked upon.
HOWEVER, this is a very cumbersome way of doing things to my mind. In addition, sizing of the controls in each day's bar is far more difficult than I expected.
Anyone got any ideas as to how I might achive this task in a more polished way?
This is probably not too bad to most... Considering I'm still pretty new to this...
I'm designing a database to track training for about 6 offices where I work. I am having trouble trying to set up a questionaire that adds a worker's training requirements automatically when a new worker is added to the system.
TABLES
tblPersonnel PersonnelID (Primary Key)
tblRequirements RequirementID (Primary Key) RequirementTypeID - Denotes the type of requirement based off of the question on the questionaire.
tblPer_Req (Join Table) PersonnelID (Joined to tblPersonnel) RequirementID (Joined to tblRequirements)
QUERY
In my query I have pulled the PersonnelID from tblPersonnel, the RequirementID from tblRequirements and the RequirementTypeID from tblRequirements.
FORM (part 1) - New Member Form
Enter the new member's information...
FORM (part 2) - Requirement Questionaire (Must bring over PersonnelID from FORM (part 1)...
I have asked the following question... (total of 10 questions, but we'll just go with one for now...)
"Does the member wear prescription eyeware?" (Yes/No - using an Option Group) (RequirementTypeID = 2)
If the member answers yes, I want the database to automatically add the member's PersonnelID and all Requirements from tblRequirements that have a RequirementTypeID of 2 to tblPer_Req (Join Table).
So far, I have gotten the query to only work by itself as a SELECT query and was not able to add the information to tblPer_Req, let alone try to tie it together with the Option Group...
If anyone could please help me get this together I would greatly appreciate it... I've been trying to work this one through for almost two weeks, the boss has tried to help too but he's also stumpped!!!
I currently receive MS excel files with forty columns and 7000 rows of data. I Perform a sense check and then convert the file to csv for loading into another system.
I've had a request to start performing this task for files of up to 13 million rows. Obviouslt MS excel will not be capable of doing this.
Can anyone tell me what MS product I should use? Access, foxpro? or do I need a non MS product and if so which one?
I am currently having the following difficulty. Let say i have 3 fields in a table.
Field 1: = ID Field 2: = operation Number Field 3: = Status What should i do if i want the following result from a query.
Field 1:= Grouped by ID Field 2:= Count of operation Number Field 3:= "status1", "Status2", "status 3"(basically concatenating the strings in each group. .:confused:
Please note that i am using Access 2003. eg of how table wold look Gr ID CountOf Operation Status 1299B 10 R 1299B 20 C 1299B 30 B 1299B 40 D 1299B 50 A 1299B 60 Z 1275A 10 P 1275A 20 Z
eg of an out put for my query should look like Gr ID CountOf Operation Status 1299B 6 R,C,B,D,A,Z 1275A 2 P,Z Please note that it is important that the order is maintained.... ie in the case of 1275A the order should be PZ and not ZP..
I have several Databases with similar tables with similar information, but entered differently. (Different persons made separate databases before my time) I would like to make new tables, write a query to combine the information into these tables, but I need to get the data similar before I can combine.
Example of information:
7L 24 3A719 AD one table might have it stored this way 7l243a719 AD another this way 7L24-3A719-AD or 7L24 3A719 AD both ways in this table and so on. There are alot of combinations
I have been in attempting Mid$, Right$, Left$, Like, Not Like and others to no avail.
Looking to make all the information the same layout 7L243A719AD, then I will be able to combine information.
The scenario - I use MS Access to access an advantage database system from a program we use. I can either import or link to each table in the program's database via OBDC drivers.
The problem - I need to track the status changes of our customers. Tracking customer status changes are not recorded in the advantage db. The TRDATA table contains the information. From now on, I want my access db to track the changes and save it in access for report purposes. The status's available are A, B, I, K, L, O, P, W, X and Y.
The solution - So far, I have queried the TRDATA table to pull the Account #, Buyer, and status. I made a crosstab query which would kind of aggregate the data into a readable form. If the account is active, there would now be a 1 in the column A. I then made another query which would then update a table. From here, I'm unsure of what to do. Obviously, there needs to be a comparison of some sort. If only account 1234 changes from an A to a Y, then I want a new table to show all the other accounts where they stand and a change of Y for the status with the date it changed. I hope I'm explaining myself well enough!! I’m very unsure of where to go from here.
tbl_Members contains many fields, two being SName and RefferedBy.
ReferredBy is stored in the table from a lookup from a form that looks up the SName field from tbl_Members.
What i want to do is create a query from this table with an extra field which counts the number of instances based on the records SName, in a field called NoReffers.
Hi everyone, here is one of the tougher problems ive had to deal with.
i have a number of fields, called teammember2, teammember3 etc..to teammember12. This is done because on the form, the user is able to select team members in addition to their original selection using a button.
Another field on the form is a "total days worked".
The problem now is adding the total days worked for each record based on the team member
for example:
if record 1 has : john smith and jane smith as team members and record 2 has: john smith and tom smith as team members
i need the report (query) show the total days worked for john smith as record 1+ record 2. and for jane smith just record 1. tom smith would show total days for record 2.
im sorry for the weird explanation! i will be happy to clarify anything.
I am running a dcount I need to count values that are between (and including) 3000 and 3499 the field is cmbLkpSCType I also need to count values that are between (and including) 3500 and 3999 The cmbLkpSCType values are 3000 through 3499 the field is cmbLkpType
My challenge is to find a way of counting one and not include the other
If Me.cmbLkpSCType = "3000" Then strBuild = Me.cmbLkpSCCountry & (Right([cmbLkpSCYear], 2)) & (Left([cmbLkpSCType], 2)) & (Left([cmbLkpSCBudgetUnit], 2)) strCt = DCount("strSourceCodeID", "tblProjectSegment", "(Left([strSourceCodeID], 8) ='" & strBuild & "')") End If '***************** If Me.cmbLkpSCType = "3500" Then strBuild = Me.cmbLkpSCCountry & (Right([cmbLkpSCYear], 2)) & (Left([cmbLkpSCType], 2)) & (Left([cmbLkpSCBudgetUnit], 2)) strCt = DCount("strSourceCodeID", "tblProjectSegment", "(Left([strSourceCodeID], 8) ='" & strBuild & "')") End If