I am running repeated calculation queries of different data, but its is not working to well. I have one query listing the total number of hats made from wool. I then have a second query of that lists the total number of hats made from wool and are black. I have third query that calculates the percentage. I have many different hats of many different colors, and i am doing the same three queries over and over. However, the calculated field for percentages does not update. E.G. I have 100 wool hats, 10 wool,black hats, 10%. The next round: i have 100 wool hats, 5 wool green hats, its will still show me 10%, as its is still calculating based on the previous data. how can i go about this most efficiently and why is not updating?
I have created a query that is designed to return a count of how many records there are in various tables. There are 10 expressions in all, so when it is run I am expecting to see one row of data with each field populated with the number of records.
It does do this, but the data is repeated over line after line (see the attached picture)
I have qrys that show current info and also repeated info. A request has been brought to me to now count how many times the repeated data has been repeated.
The data is updated daily, so the repeated record would need to increase in the number of it's occurances by 1 each day.
Any guidance on how to accomplish this is GREATLY appreciated! :)
The 001: to the first '_' is the important bit this is defining a "Router" what I need to do is total up how many '001:*_' there are, not including duplicate numbers.
Firstly if I understood this (http://www.access-programmers.co.uk/forums/showthread.php?t=92001) post correctly I need to have all the VPIAddress the same. If this is correct is there a way to get access to delete the data after the first '_' ? (I would of posted in this tread but i didnt think that would be right, if im wrong mods move the post :) )
Secondly will the info in that post help me to reduce the data into this :
So that I can then see how many Physical "routers" there are
If any one can help me and tell me that my idea will work then tell me how to do it id be extremely happy!
Even if any one says that wont work and gives me the correct way to do it and does a virtual "Clip around the Head" and call me a Daft Bugga I would still be happy because I wouldn't have to trawl through the entire 16000+ entries deleting and modifying.
I'm trying to set up a query where it returns me only the items that are repeated.
ie...I have a table that has clients that are one time clients and other that are repeated. Each client has a client number. I would like to get only the clients whose client number appears more than once. Is that possible?
I have a database with a form called "Main" where users input data and then print a report from it. "Main" has fields in it from another form "Members". This data (from "Members") is shown on "Main' by Dlookup coding, and therefore cannot be selected for input by the user. Now, lets say a user inputs data into "Main" and prints the report on 12/30/2012. On the next day, a member's name is changed and I update that data in the "Members" form. On 12/31, I would like to print the report again, but it shows the updated member's name instead of what is was like on 12/30. How can I keep the old data in case I want to print the report in the future like it was initially printed? What do I need to do to any form(s), report or what VBA code needs to be written?
Hey guys im stuck on this one. I need a fax # to be changed from 1 format to another. i dont even know where to start any help would be appreciated. the original data is already in a table like so; (999)#000-0000 and i need on my final table or query all the records to be:9990000000
I have been stuck on this one all weekend long, can it be done. thank you.
I have a very simple database used by 3 users at a time. It is split into BE and FE. One user accesses the DB with queries only so I have created a DB with the master file linked - and literaly nothing else, She will then create and save all of her queries here. But - I want to keep her from accidently updating the file from here. I can't seem to find a simple solution to simply not allowing her to update. Any ideas? Thanks - Dika
Hi, I have a form which is made up for 3 tables and I am trying to create an append query for each one in order to keep records of data before it is updated. The append queries seem to work but they append all data rather than just one selected record. I know I will next need to create a macro which can be used each time a record has been updated and a copy is sent to the archive. Can anyone help me with this, or have any useful suggestions?
This works but the problem i have is, when i add an entry via a form or do anything else via a form. This does not get updated?. I check the properties of the table and that isn't either.
When i then modify something manually in the table (go in and change it). It then updates.
Is there something im doing wrong or is there a better way to check the last updated.
This one is driving me NUTS! I have a form with a combobox, a few textboxes, and a sub-form. On Load the form is populated with a sql command/rcSet.Fields() results. The user then chooses a status from the combobox to narrow down the results. The combobox OnChange event looks like this... sDate = Forms("frm-MENU").txtS_Date.Value eDate = Forms("frm-MENU").txtE_Date.Value xJob = Forms("frm-HD/DVR_CC").lstJob.Value
On Error GoTo hd_dvrErr 'this gets the top of the HD/DVR form sSQL = "SELECT Count(*) AS Total, Sum(IIf([pmt_meth] In ('C','E'),0,1)) AS Error, Sum(IIf([pmt_meth]='C',1,0)) AS [Credit Card], Sum(IIf([pmt_meth]='E',1,0)) AS EFT " & _ "FROM [tbl_HD/DVR_CreditCard(*)] " & _ "WHERE ((([tbl_HD/DVR_CreditCard(*)].CDATE) Between #" & sDate & "# And #" & eDate & "#) AND (([tbl_HD/DVR_CreditCard(*)].JOB_TYPE) Like '" & xJob & "*'));"
Set db = CurrentDb() Set rcSet = db.OpenRecordset(sSQL)
With Forms("frm-HD/DVR_CC") .txtTotal.Value = rcSet.Fields(0) .txtError.Value = rcSet.Fields(1) .txtCC.Value = rcSet.Fields(2) .txtEFT.Value = rcSet.Fields(3) End With
'this gets the bottom or subform of the HD/DVR form sSQL = "SELECT IIf([Agent]='UNKNOWN','xxxxx',[REP]) AS [Agent ID], [tbl_HD/DVR_CreditCard(*)].Agent, [tbl_HD/DVR_CreditCard(*)].JOB_TYPE, Count(*) AS Total, Sum(IIf([pmt_meth] In ('C','E'),0,1)) AS Error, Sum(IIf([pmt_meth]='C',1,0)) AS [Credit Card], Sum(IIf([pmt_meth]='E',1,0)) AS EFT, Sum(IIf([pmt_meth] In ('C','E'),0,1))/Count(*) AS [Error Rate] " & _ "FROM [tbl_HD/DVR_CreditCard(*)] " & _ "WHERE ((([tbl_HD/DVR_CreditCard(*)].CDATE) Between #" & sDate & "# And #" & eDate & "#)) " & _ "GROUP BY IIf([Agent]='UNKNOWN','xxxxx',[REP]), [tbl_HD/DVR_CreditCard(*)].Agent, [tbl_HD/DVR_CreditCard(*)].JOB_TYPE " & _ "HAVING ((([tbl_HD/DVR_CreditCard(*)].JOB_TYPE) Like '" & xJob & "*')); "
Set qdTemp = db.QueryDefs("qry_HD/DVR") qdTemp.SQL = sSQL qdTemp.Close
If Not Forms("frm-HD/DVR_CC").FormFooter.Visible Then Forms("frm-HD/DVR_CC").FormFooter.Visible = True Else 'DoCmd.Close acForm, "frm-HD/DVR_CC(Footer)", acSaveNo End If DoCmd.OpenForm ("frm-HD/DVR_CC(Footer)"), acNormal, , , , acHidden Forms("frm-HD/DVR_CC(Footer)").Recalc Forms("frm-HD/DVR_CC").Refresh Forms("frm-HD/DVR_CC(Footer)").Refresh ' DoCmd.MoveSize Height:=Forms("frm-HD/DVR_CC(Footer)").WindowHeight + Forms("frm-HD/DVR_CC(Footer)").FormFooter.Height
I have used similar code on another form and everytime the search criteria changes the sub form updates to reflect such. I know I am missing something small; can somebody please point it out?:D I need to have the subform show the updated (choice from combo) criteria.
If this seems to cloudy, please let me know and I will try and revise
Need Help... I deleted a field (Senority #) in my table and so on with the queries, forms. reports that had that field. I redone my query so that it would calculate my senority (thanks to all that helped). When I went back into my form that previously had the senority field I could not edit or change anything. All I got were beeps. I do not have any locks on the text boxes, combo boxes, forms, ect. Please help!!!!
i have a table with a column that reflects the below info, need to work out something for access to keep a count on the numbers of fields, have tried using conditional "count" in queries, the resultant value return is 12, this count omits counting all the "1", which is not i wanted, how do i tell access to start counting from the most recent "1" onward, and in this case the correct count value should return as "5", meaning there are 5 fields being entered after the most recent "1".
I have a table with two fields; Part and remarks - both Text fields containing 1.8 million records. Remarks field has 600,000 blanks in the field. I filtered for blanks to get the 600,000 records displayed. I want to update this field to N/A where null values exist. My code is
UPDATE PartApplications SET PartApplications.remarks = "N/A" WHERE (((PartApplications.remarks) Is Null));
The query updates 55,000 records ONLY and leaves the remaining blank.WHY would all null values not get updated?
I maintain a shared database that I would like other users to be able to see when the data was last updated when they open it so that they can see how up to date the information is from the switchboard.
Currently I am doing this manually by updating the date in a label on the switchboard header, but ideally I would like to add a final action to my update macro (that imports new data into the database) that would automatically do this for me on completion if possible.
Code: SELECT SYSADM_CUSTOMER_ORDER.ID, SYSADM_CUSTOMER_ORDER.STATUS FROM SYSADM_CUSTOMER_ORDER WHERE (((SYSADM_CUSTOMER_ORDER.ID) Like 'Q%') AND ((SYSADM_CUSTOMER_ORDER.STATUS)="H"));
So basically getting all records in the CUSTOMER_ORDER table that have ID beginning with Q and the STATUS is H (on hold).
I want to simply update these to change the STATUS to C (closed).
I converted the SELECT Query to an UPDATE Query and added a "C" in the Update To Field.
The SQL View is now:
Code: UPDATE SYSADM_CUSTOMER_ORDER SET SYSADM_CUSTOMER_ORDER.STATUS = "C" WHERE (((SYSADM_CUSTOMER_ORDER.ID) Like 'Q%') AND ((SYSADM_CUSTOMER_ORDER.STATUS)="H"));
But for some reason Access is telling me that it will update 0 records. There are over 2500 records to update.
I have developed an application using MS Access and MySql tables. The Access forms maintain/display orders that are stored in the MySQL linked tables. The MySql tables can also be updated independently by another process. The problem is that the Access forms do not reflect the backend changes when they are made by the other process.
For the moment I have implemented an on Timer process that causes a requerys for the forms every 5 seconds but this is not very elegant and causes the form screens to flicker.
Is there a better way I can automatically make the front end forms reflect changes to the back-end database when it is updated indepenently ?
Hi, I have a VB6 application talking to Access DB. The program was suppose to do some audit tracking but due to a bug it didn't create data in Audit table. Is there a way i can retreive data which is updated (Old values) for 2 tables. If there is a tool/utility i can buy please let me know.
I've been making small changes here and there to my database in Access 2013. I have left the original database in place and it has acquired many new records from the last month. I'm ready to start using the newly updated design version of the database, but I do not want to have to type all those new records into the new database to get it up-to-date. There has to be a way to import the data from the original database to the newly updated one.
Most, If not all of the fields have the same names, but some of the fields have changed, like to Combo boxes. I removed two or three unneeded fields, and added two or three. I understand the new fields will need to have data enter to them, but the remaining would be redundant and inefficient if I have to reenter all the recent records again.
How do I import the data from the original two tables to the new updated database? I only have two tables and they use a One-to-One relationship in both databases. The table's names are different, but as I mentioned earlier, the fields are mostly the same. Do I need to import into Excel, and then modify the data slightly, and then import into my new database?
I'm mid build on a commitments tracking (pseudo Purchase Order system) project, but seem to have run into an issue with a loop I'm building to allow users to edit commitments. The idea is that an edit form is launched, values amended and the submit button is clicked. A VB subroutine then validates the entries to ensure that the mandatory entries are included. It then writes a copy of the original values to the Archive table, before attempting to update the existing commitment with the new values..
This is working perfectly, apart from the fact that 3 fields that are "updated" are being updated to a blank value..
Code: Private Sub CommitSubmit_Click() Dim SQLStr, LastID, DOwner, DHeading As String Dim ErrState, Dtype, DProperty, DTCA, DITD, DSD, DED, DSP, DRetention, DRA, DRPD, DSupplier, DDOW, DStatus, DUser, DShD As String Dim Authcheck, Complete, ErrMsg As Boolean Dim QDF1, QDF2 As QueryDef
when i change a form so that instead of single form its multiple forms it seems to only want display 30 instead of the 62 that exist. is there a quick fix this?
if not is there a way to make it display the next 30?
as now it says "record 30 of 62" when it gets to the bottom of the form... ;/
Hello All, In my table, I have some records that are duplicated (aside from the primary key). How can I select only one record from each set of duplicated entries? (There may be more than 2 of each of the duplicated records, but I only need to pull one of them...doesn't matter which one.)
i.e...Like a 'Find Duplicates' query, but only returning the top 1 primary key from each duplicated set.
I have a pair of combo boxes which are n a frm and work fine. The code is:
Private Sub cboSubjectSelector_AfterUpdate() Me!cboOneBookSelector.Requery Me!cboOneBookSelector.SetFocus End Sub Private Sub Form_Current() Me!cboOneBookSelector.Requery End Sub
I want the combo boxes to be repeated five more times so that the same options are given within the same form. Every time inset a copy of the same combo box get the folowing error message:
'Microsft Access can't find the macro 'requery'' I am ot sure what I need to do nrder t remove the error message. I did not create a macro called 'requery' tis part of the code above. I have alos tried to recopy the code above and then retnamed the cbo in the form adn then modified then copied and modified the code to see if that helps - it doesn't. Any ideas - please help.