I have a query that sums downtime on equipment. The problem that I came across is that there can be multiple status items open up on the same piece of equipment. When the restored time on one status item occurs after the down time of another, the query still adds the total down time of both status items which is giving me greater downtime than there actually is.
I'm trying to create a report that pulls from two tables [tblTelephony] and [tblSales]. All data in my query is limited to a date range entered through a form.
For every record in [tblSales] (showing the agent made a sale) there is a record in [tblTelephony] (showing all the stats for the agent's day worked). [tblTelephony] has one date for each record. [tblSales] has two dates for each record. The sales dates are the date the services were ordered (matches the date worked in [tblTelephony]) and the date the services were installed.
In order to get an agent's MTD Sales stats I have to query the date range on Install dates. MTD Telephony stats are run on the same date range on telephony date. Where I run into an issue is with the sales that are ordered before the date range in question and installed during it.
I've run a separate query to sum the sales installed during the date range and used that sales value in my Telephony query. In order to get my data to show as accurately as possible, I had to create a relationship between the Order Date and the Telephony date. I'm really hoping to find a way to force the sum of sales in sales query to show in the sales column in the telephony query, regardless of the telephony date range and without adding telephony data for dates outside the range.
Example: Date Range = 2/1/14 - 2/24/14 Telephony Date = 2/3/14 Order Date = 2/3/14 Install Date = 2/14/14 Appears on report
Date Range = 2/1/14 - 2/24/14 Telephony Date = 1/31/14 Order Date = 1/31/14 Install Date = 2/3/14 Does not appear on report
How to get the sale example on the bottom to show without removing the relationship?
At the moment I am working a little project at work and am stuck on how to calculate departments due date based on actual order due date.
example:
OrderID: xxxxxx-xx DueDate: 10/8/13
Now let say i have 5 different departments but I want/need to know what should be the due date for each of those departments based on the due date on top.
Is it possible to copy a record 'n' number of times, incrementing the date by either days, months, weeks etc?
I have a regular payments table that will need to be edited at some point should either dates, or amounts change, but... regardless of the size of the table, it's not a problem, as these will be moved to a different table and deleted once paid.
Given the example, would it be possible to copy this record and additional 5 times, incrementing the date by one week.
I have developed a small hotel booking system which inserts records into a reservations table. The table looks like this: [ReservationNr][StartDate][EndDate][RoomNr]
I am now trying to add a constraint which prevents a room from beeing booked twice on the same day, hence the time period defined by StartDate and EndDate in a record must not overlap with another record. Is Access capable of adding such a constraint? It was easy to add a constraint that prevents a booking where the StartDate is before the EndDate, but this one needs to reference already existing records. Any help would be much appreciated.
I have a report whose fields are arranged in a table:
I need all fields to be able to grow in the event that there's more text than the box can hold, so I have all fields "Can Grow" property set to Yes.
However, when any of the top row fields (Field1, Field2, Field3) need to grow, the entire top row grow but the bottom row stays put and doesn't move down, which causes the top and bottom rows to overlap -- like below (look at ID # 4):
Green is the top row, Blue is bottom row:
how I can get the bottom row to move down when the top row grows?
I have made several extractions from back ups from our ERP system using maketable querys. Each time when I renamed the table after running the maketable query. I now want to add them to create one big table showing the records which I extracted. I now found that each time when I extracted from my back up tapes there was a little overlap in time which gives me double entries when I use an append query to add them al together.
Is there a way to set parameters which filter our double entries and only adds the unique records to this table?
I have an Access form that is tied to a recordset. When I Set Focus on 1 text box in particular, I move the caret with the keyboard arrows left-right, and the caret moves and flashes on top of the text characters, basically overlaps the character. When I then try to delete or edit the text, it moves the caret by itself to a different location in the text box and starts adding the text to that location. When I finally get the text how I want it, I set focus on another control, and it occasionally deletes random characters in the text box.
The only way I have been able to work around this is to copy and paste the current text into Notepad, edit it there, and then paste it back into the text box.
I'm creating an equipment hire database, and I was wondering how I would not permit overlaps of equipment hire ie. equipment being borrowed before it is returned. I have a query that lists all bookings that overlap, but I am unsure of how to implement this into the table to prevent overlaps.
I have a form (frmMain) which has a header with some basic links and text boxes I would like to keep as a frozen pane on top as the user are scrolling down the detail section of the form. The detail section does include a subform if that makes a difference (frmhome). When going to Options>Current Database> tabbed documents, the form header stays frozen perfectly.
I however would like to use "Overlapping windows" as the form center aligns in the Access window instead of left aligning when using "tabbed". So either :
1) how do I keep the header frozen in "overlapping" or 2) how do I center align the form in "tabbed" view, as right now the form just wants to go as far left as possible in the full Access window.
I've read on this forum that memo fields can be a spot of bother. I only saw this after I put several memo data types in my tables. I wasn't going to do that much with them; it was intended as a electronic scratch pad of sorts for the user. Where does the trouble arise from with them? Should I just leave them or should I change them to text fields with 255 chars and hope that's good enough?
I have inherited a 5 table database which is associated with membership details and all tables are linked via the membership number which appears in every table..eg Main Register membernumber, surname, forename, age etc etc etc Home address membernumber, address1, address2, address3, postcode Business address membernumber, company name, address1, address2,etc etc etc Subscription membernumber, grade, subscription, bank account, etc etc Training membernumber, college, results, etc etc
I am informed that it is bad practice to have duplicate data in multiple tables (ie. membernumber field) as updating the data item would be difficult (eg. if the members number needed to be changed for any reason). If this is the case how would I restructure the tables but maintain the link through the membernumber?
I am fairly new to Access....as you can no doubt tell.
is there a way that I can compare the ID number from a combo box selection and a table... in order to avoid duplicating that same entry?
ie If me.cbo1.column(0) = [table name].[field] then me.cbo1.column(0) and me.cbo1.column(1), etc... = vbWhite
End if
What I am ultimatly trying to accomplish is a way to get rid of one selection in a combo box after it has been selected once and used for another record. is the .requery a better method... if it is, can someone please elaborate on how to use that a little more.
Hi all, I have an append query that I run daily and want to append only records with different OrderID. ------------------------------------------------------------------------ INSERT INTO tblConfirmSchedule ( OrderID, JobCode, JobDate, Status, [Home#], [Work #], Ext, [Other#], Ext2 ) SELECT Orders.OrderID, [Schedule Info].JobCode, JobSchedule.JobDate, JobSchedule.Status, CustNew.[Home#], CustNew.[Work #], CustNew.Ext, CustNew.[Other#], CustNew.Ext2 FROM (CustNew INNER JOIN Orders ON CustNew.CustomerID=Orders.CustomerID) INNER JOIN ([Schedule Info] INNER JOIN JobSchedule ON [Schedule Info].JobCode=JobSchedule.Scheduled) ON Orders.OrderID=[Schedule Info].OrderID WHERE (((JobSchedule.JobDate)>Now()+3) And ((JobSchedule.Status)="Scheduled")); --------------------------------------------------------------------------
2 tables in an Access database tblPurchases: columns: Index (PK-autonumber)| Store| Product| Cost data: 1| Staples | Tape | $0.89 2| Staples | Paper | $4.50 3| OfficeMax | Markers | $3.50 4| OfficeMax | Paper | $4.75 5| OfficeMax | Pens | $1.98
tblInfo: columns: Index (PK-autonumber) | Store | Product The data in the access database tblInfo.Store is queried from tblPurchases.
Here is the query for the rowin my database design view:
SELECT DISTINCT tblPurchases.Index, tblPurchases.Store FROM tblPurchases;
When I am in the database and access the column's pull down, I get ALL records, including duplicates (so OfficeMax is listed 3 times.) How do I get it so I only see Staples OfficeMax in the pull down when in the database?
When I navigate from one record to another record in this form, the values in the controls take a looooong time to populate (most of the time they come up as blank and when I move my mouse over that control - the value gets populated....this is slow !!!).
I believe this is happenning because I am using DSUM function all over the form.
What is the fastest way to display this control WITHOUT using DSUM?
Ok, here's the deal. I'm tired of fixing our gigantic table because of corrupt records in my firm's database. I find that the problem ordinarily comes up when someone opens the same record in two different forms (whether on the same computer or on a different machine) and both attempt to make changes. Is there a way (preferably simple) to just LOCK a record in a particular table to keep this from happening? I assume there has to be, but I've just never taken the time to find out. I'm not sure if this locking is done on the form level or somewhere in a table option or something.
i want to have one form, that relates to about 70% of the data in one table. however, the remaining controls will be coming from 3 other tables. i cannot for the life of me figure out how to create a form that will display these controls for all 4 tables on a single page.
every attempt i make with the wizard makes me the form with 3 subforms that the user has to scroll across the page to use. i need to have all my controls pretty much lined up on the page without moving horizontally across the screen to enter data
ive tried creating a form by dragging the fields into it in design view from the primary table, but i cant see how to include (or drag) fields from my other tables into this form
I have the follwing three quantities: category, month and value.so I would like a report to place each value in the corresponding row (category) and column (month).using a cross tab query this is quite easy, and I also managed with a simple query, by placing 12 textboxes in the report and using the iif instruction (iif month-jan,value,null and so on for each month).
now the problem arises when i have two values for the same category but in different months. In this case, the report will place the last value in the line below the previous, leaving a blank space.I'll upload an example asap, in the meantime i try to explain it here below:
I have a master to child table relation which is one to many. Each one is represented by a different form.
The problem is, the user enters the primary key "JobID" on the master form, then he needs to enter a few records on the child list with the same "JobID" which is the foreign key in that case. I don't want the user to enter the "JobID" every time he enters a new record in the child form.
Is there a way I can copy the primary key to the foreign key each time the user enters a new record in the child form?
I have the following code (below) that I use to allow the user to select a particular value to determine which records to delete. However, I was wondering if there was a way to avoid having the Microsoft Access auto-generated messages pop up.
For this particular case, after the user selects the value and hits the command button, then a msg box comes up verifying if the user wants to delete the records with selected value. Clicking 'Yes' will then generate the Access message that asks the user again if they want to delete the records and that these actions can not be undone. Clicking Yes here will delete the records.
However, clicking 'No' or x'ing off this Access generated message will then cause a Run-time error 2501. I want to handle this error if it all possible.
Code: Private Sub CmdRemove_Click() Dim strQuery As String DoCmd.Beep If vbYes = MsgBox("Are you sure you want to delete? Clicking 'Yes' will completely remove all prospects with the selected Class from the database", vbYesNo + vbQuestion, "Delete prospects?") Then strQuery = "DELETE * FROM [Prospects] " & "WHERE Prospects.Class = '" & Forms("Classpopup").cmbRemove & "';" DoCmd.RunSQL strQuery End If End Sub