Updating A Form Based On A Query Using The "total" Feature

Aug 24, 2004

I have set up an ACCESS database of journal articles. Each article has one or more authors. I have created a form listing the article title, the name of the journal etc. Included is a subform listing each of the authors. The authors are listed in the order that their names appear in the article. I wrote a query to sort the articles alphabetically according the name of the first author (in the subform). The main form is based on this query so that all the articles are sorted according to the name of the first author. However, the query uses the “First” feature in the “Total” row on the query. The use of this feature precludes me from updating information in the form that is based on the query. Is there a way around this problem and if so what is it?

View Replies


ADVERTISEMENT

Updating A Form Based On A Query

Jan 31, 2005

First, let me point out that I am a new Access user, so apologies ahead of time

I have a form which has a field called 'Initials'. I want this field on the form to default to whatever was last entered (into the table called 'Main Table'). I first tried setting the default value with a DLast command, which seemed to work for a day or so, but then it returned values from mid-table - very strange

I then set up a query which does return the value of the last Initials entered (cunningly called 'Last intials entered'), but I can't get the field in the form to default to this value - it comes up with #Name?

Can anyone help, or have I not explained myself very well

Cheers

View 1 Replies View Related

Updating Several Tables At Once From A Form Based On A Query

Jan 8, 2006

Hi,
I've spend ages reviewing the relationships between my tables and changing my query but cannot get this to work. I've read alot of the posts on the subject also but trying to apply the suggestions to my problem hasn't worked.

It is a database of engineering drawings. A drawing can have one or more revisions. I have written code to import the drawing and revision info into the datebase so when the drawings are actually received I need to be able to add the additional data in tblReceivedDrawings such as the tracking number, date received etc.
These are my tables:

tblDrawingRegister
DrawingNum (PK)
DrawingName

tblDrawingRevisions
DrawingNum (PK)
Rev(PK)
LatestIssueDate
ElectronicCopy
OrderNum
DrawingStatus

tblReceivedDrawings
DrawingID (PK) auto-num
DrawingNum
DrawingRev
DateReceived
ActionCode
TrackingNum

I have created a query called qSelDrawingsAndRevisions which combines tblDrawingRegister and tblDrawingRevisions.

The form is based on a query called qSelIncomingDrawings. This query joins qSelDrawingsAndRevisions and tblReceivedDrawings. It shows all the records from qSelDrawingsAndRevisions and related records from tblReceivedDrawings and is joined on the drawingNum and Rev.

Adding the extra info e.g. tracking num, date received etc about drawings that are in tblDrawingsRegister works fine. However if I want to add a completly new drawing I get an error message:
"The Microsoft Jet database engine cannot find a record in the table 'tblDrawingsRegister' with key matching field(s) 'qSelDrawingsAndRevisions.DrawingNum'

How can I get it to update the drawingNum in tblDrawingRevisions and tblDrawingsRegister at the same time?
Is it an issue with my query or relationships?
Or do I need to write an OnUpdate procedure for the DrawingNum textbox so that it created a new record in the DrawingsRegister table to correspond with the one in the DrawingsRevisions table?
I have a feeling that this might be overcomplicating it and that I just need to change the query?

Am very confused about how to approach this and would really appreciate a few pointers...

View 12 Replies View Related

Updating Information In A Form Based On Query

Apr 29, 2005

Hello

I have made a form based on a query that pulls information from 4-5 tables. I would like to be able to change information in those 4-5 tables by using that form, but I am unable to do it. I opened up the properties for the form and set "data entry" and "Allow edits" and "allow additions" and "allow subtractions" all to YES. That didn't help.

Is it possible to do this, since the form is based on a query? I couldn't figure out a good way to set up the form getting the information directly from the four tables. I'm not sure why it's been so difficult.

I have one table full of all of the various titles I have. The tables are related using those titles, and each table has a different sort of information for each record. So, the "main" table is "ALL TITLES," but when I go make a form, I can't get ALL TITLES to be the controlling table. It's very frustrating. But a query works beautifully--I just can't change anything.

(I would like to have the form be a "user-friendly" way for people to make changes.)

Thanks for your help.

-Siena

View 2 Replies View Related

Total Newbie Question - Form Updating Not Table

Dec 1, 2004

Okay I've looked around but haven't found an answer to this, if there is one in the forum please forgive me. I've created a database to help track employee passwords for differnt system I placed and Audit Trail on the form (the example from Microsoft) however it updates only the form and not the table and I need it to do both. Please Help!

Thanks

Rand

View 14 Replies View Related

List Feature Based Upon What A User Previously Typed?

Nov 20, 2013

I have a subform containing maintenance logs for pieces of equipment, viewed as a Datasheet.

I have a field called Comment accepting text. Since comments are similar, it would be nice to have a drop down list so the user can select what was previously typed in other records and then edit it from there, similar to how Google or search engines in its search text box generates as part of its suggestion list the previous searches after typing in the first few matching characters.

I tried looking through, but is there a property that does this?

View 3 Replies View Related

Queries :: Query To Total Based On Value Of A Field?

Jul 31, 2013

the relevant fields look something like this:

TellerNum - Date - Field1 - Field2 - Field2

I need a way for my query to take all rows with the same TellerNum and add Field1, Field2, and Field3 together for those records. So, there may be 20 records with the same TellerNum, and I need Field 1, 2, and 3 to be added together and then totaled for all 20 records to give me 1 grand total. I need this to be done for each TellerNum, so that the results will be a grand total for each TellerNum. So, the results may look something like this:

TellerNum 1: 486
TellerNum 2: 300
TellerNum 3: 240
etc..

View 3 Replies View Related

Updating - Based On A Query

Jun 29, 2005

I have a list of sites (approx 15,000) that I need to update.
Basically, against each site we store a region code (HR1 - HR7) and we have decided to increase the number of regions we operate with. I have created a spreadsheet that states the post codes included in each new region (NR) and now I want to create a query that looks at the post code of the site, then according to my spreadsheet, changes it to the new region. There are no new sites to be added, simply old ones to be updated.

How can I do this easily?
I have imported my spreadhseet into access, and I have all the data there - just unsure of the query to update.....

View 11 Replies View Related

Queries :: Using Query To Place Single Grand Total On Row Based On Particular Criteria?

Dec 7, 2014

I have a very simple query on an accounts form to show a running transaction history.

Identifying from the TransactionID (shown for display purposes only - normally hidden) three or four postings make up one transaction.

Using TransactionID 10 as an example, I'd like to have a sum of total [Credit]-[Debit] and have the query display on one line (either at the top of £1,429, or at the bottom of £16,995) to identify this is in fact one transaction, having three posts.

Transaction 9 will have obviously have one total, as this is a single post.

11 the same as 10, by having one total Transaction Value either at the top of the row or bottom.

View 4 Replies View Related

Reports :: Updating Report Based On Crosstab Query

Apr 19, 2015

I've got a self updating crosstab query, its essentially a monthly summary and every month a new column is added (one corresponding to the current month, i.e., next month the new column will be may, following that the new one will be june, etc)

I've designed a report to be based on this query and i tested it out by manually adding data for next month into a table, the query auto updated however the report remained the same (ended in april instead of adding a new column for may).

Just curious if there is a way to automatically add these new columns to the report every month or will i have to do so manually?

View 1 Replies View Related

Zoom Feature In A Form

Jan 1, 2015

I would like to add a zoom feature to a form. If I size the window down to the point where it cuts off some of the fields, I enabled the vertical and horizontal scroll bars for the user to navigate throughout the form to see everything they need to. However, is there a way to size the contents in the form down, in other words, zoom out so even if I size the window down, I can see everything in the now smaller window?

View 6 Replies View Related

Updating Total Cost In A Table

May 17, 2007

I have a table called: Invoice which has Invoice No (as the PK), Invoice Date, Total Cost.

I also have another table called Task: which has Task No (as the PK) , Task Type, No of hours, Charge Amount.

The user enters the Details of Task and Invoice in a Form. I have a field called Total Cost of my Form which should Calculate =([No of hours]*[ChargeRate]).

The problem I have is the total cost on the form is not being updated on the Invoice Table with The Total Cost.

Can anyone help please

View 3 Replies View Related

Auto Updating Total Order Cost After Quantity Is Changed

Oct 11, 2006

Ok so here is my problem:
I have a form that is realted to four differnt tables with the names: CUSTOMER, ORDER, PRODUCT AND ORDER LINE. With-in the table Order-Line there is a entity called, line_item_cost whcih is the total amount of the order with respect to Quanity_Ordered which comes from the ORDER LINE table and Price which comes from the PRODUCT table and Discount (%) which comes from the CUSTOMER table. When the users goes to change the Quantity_Ordered I need the form to automaticly update the line_item_cost which would calculate [Price]*[Quantity_Ordred]-[Price]*[Discount] . I tried to build a code in VBA to do this, Here is the Code:
Dim a, b, c, d
a = Me.[Quantity_Ordered]
b = Me.[Price]
c = Me.[Discount]
d = a * b - b* c
Me.[Line_Item_Cost] = d

VBA Complies the program but it does not show up in my form.
I think I might be updating it at the wrong point.
Any Suggestions.????

View 4 Replies View Related

Forms :: Total Query - Count Of Fields Based On Data In Other Fields

Jun 28, 2015

I have a query that creates counts of fields based on the data in other fields, basically it tells me that in a table there are two entries with value ABC????? and three of DEF????? , the query works perfectly.

When I create a form to display this data and base the form on the Query I keep getting a message box asking for the ID (key field) from the base table.

If I type * in the box (to denote all values) and press enter I get the results expected.

View 4 Replies View Related

Queries :: Self-Referencing Running Total Used To Calculate Next Total In A Query

Jul 23, 2015

I am trying to create a query that has a self referencing running total based on the values (point totals) of itself (running total of values in the running total column that have already been calculated for all previous records) plus the total of new points being added in the current record, less the total of points being removed in the current record. This running total can never go below 0, if it does, the running total should restart at zero and add in only new points and begin the process again with the next records

I am able to do this in Excel in less than two seconds so I know there has to be a way to port this into a query. I've attached an excel example of what I am exactly trying to do

If it takes multiple queries to complete the required output I am ok with it. In my previous outtakes I have had up to 8 queries but just couldn't seem to do it..

View 9 Replies View Related

Forms :: Parameter Based Query - Filter A Form Based On Another Form

Mar 20, 2013

I have a form which uses a parameter based query to present an individual senior doctor with a list of names for of individual juniors to provide an assessment report on. When the first form opens the user enters their RespondentID.

Once senior has decided which names to comment on I have another form which has the questions to be answered which is opened by clicking a button on the first form.

How can I pass a parameter from the first form to the second so that only the records relevant to that senior doctor are displayed? The underlying table has 60 senior doctors and 20 junior doctors. The senior doctor is identified by the field RespondentID in the first form. I've tried putting a WhereClause in the FormOpen command but I still get a dialogue box asking for the parameter RespondentID when the second form is opened.

View 2 Replies View Related

Query Aggregate Value Won't Subtract From Form Total

Nov 7, 2006

Here's a sticky one? (maybe...) I have a number of aggregate totals from several queries all linked to the Input Query and all Nz'd as 0's

From the image enclosed the totaling text box (top right left) is calculating the value in the properties box. The value should be 3.52 + 5 - 8 = 0.52 the value showing is -4.475 (which is 3.52 - 8) so I see it's ignoring the 5 value but I can't see why.

The ACDays and ALDays values are both generated by the same module, but with different Leave types. and as I mentioned previously all Nz 0'd

Any thoughts appreciated, I'm baffled:confused:

View 6 Replies View Related

Modules & VBA :: Updating A Field In A Form Based On Another Table Field

Sep 13, 2013

Using Access 2010. Fairly new to automation and macros.I have two tables (tblProductReceived and tblBins) and a form (frmProductReceived).A field in tblBins corresponds to a location the bin is at (named BinLocationID) and the tblProductReceived table tracks product that a specific bin has received.

What I need is for the tblProductReceived field PRLocationID ([tblProductReceived].[PRLocationID]) to be automatically populated with where the bin is at ([tblBins].[BinLocationID]) when selecting a specific bin in the form (frmProductReceived).

View 1 Replies View Related

Forms :: Total Line From A Query Displayed In A Form

Jan 8, 2014

I am looking for displaying the totals from a query onto a form.

I have a query which has a total line showing a count of the number of entry's in each column. I would like to be able to display these totals on one of my forms in text boxes (or any other way). Is this possible and if so how do I do it ?

View 3 Replies View Related

Queries :: Query To Run Before Report Based On Criteria Based From Two Combo Boxes On Form

Mar 20, 2013

I have a report that gets its data from a query. I need the query to run before the report based on criteria based from two combo boxes on a form.

View 3 Replies View Related

Total Based On Calculation

Nov 20, 2006

Good Day!
I seem to be running into a calculation problem in one of my queries. I have two fields in the query, AdmitDate and DischargeDate. I built in an expression, Exp100 to catculate the date diff in days between these two dates. Now what I want to do is display a count of the grand total days. So, if I have the following three records:

ID AdmitDate DischargeDate Exp100
1..... 01/01/06.........01/15/06............15
2......07/12/06.........07/19/06............7
3......04/27/06.........04/30/06............3

My query should display:
Healthy Plan Total Patients=3
Healthy Plan Total # Days = 25

How can I program this to correctly display this information? Thanks for any help or advice, it would be most welcome at this point. Cheers.

View 10 Replies View Related

Total Record In Each Query To Be Shown In Main Dashboard Form

May 23, 2013

I have a database with many Quires I want to create in the main form "welcome Form" many txt boxes cells

To show a total records in Each Quires

For Example I have the below list queries

Expired Employees PassportExpired Employees Work PermitExpired Employees VisasExpired Employees Insurance

In the "Welcome Forms" I will create a txt boxes Cells for Each one of those Queries to be Show only No "total Record in Each one". It is like a dashboard to monitor daily without opening the Report or Query...

View 3 Replies View Related

Chart Based On Form Based Parameter Query

Mar 22, 2006

Hi all,

stuck on this, not sure if it can be resolved....

I have a parameter query for which the parameter is based on a form field entry (i wanted to avoid the dialog box popping up).

No problems with this....however, I want to create a chart based on the same query however, i get the following error message because it does not recognise the query parameter.

Error Message: The Microsoft Jet database engine does not recognise '[Forms]![frmChooseDTDate]!DateOccured' as a valid field name or expression.

Can this be resolved?

Help most appreciated!

regards to all

K

View 2 Replies View Related

Forms :: Update Form / Query Without Updating Underlying Tables To Query

Jul 23, 2015

I have a form which will be used as the basis to print a label.

It is bound to a query and when I open the form I pass over a 'where' condition to return 1 record. I then use the query to produce a report/label.

What I want to do is to update the form/query without updating the underlying tables to the query.

View 14 Replies View Related

General :: Update Total Based On Another Field

Oct 30, 2012

After testing it, the database got corrupted. I had backed it up just prior to using this.

It was something like = Sum(Abs[AmountPaid], [Paid] = "X")

I have a continuous subform with an "AmountPaid" column. The total is displayed in the subform footer. I need it to display the total for only the fields with an X in them denoting that they were paid. This total should match the statement we receive.

After clicking the button to put the X in the Paid field, then I used the formula to update the AmountPaid field.

Joe..........10..... X
Al..............5.....X
Flo.......... 25

.....Total = 15

View 3 Replies View Related

Modules & VBA :: Running Total Based On Set Criteria

Oct 30, 2013

I have a query I am trying to build currently which creates a running total based on set criteria. I essentially have three columns (All times are in minutes). The visit ID, the duration of a visit and the time difference between the current and previous visit. e.g.

ID Duration Difference
1 30 0
2 45 10
3 15 20
4 60 10
5 15 10

What I would like to achieve is the following:

ID Duration Difference running total
1 30 0 30
2 45 10 85
3 15 20 15
4 60 10 85
5 15 10 110

So a line will have the calculation of the current time + the difference between the current and previous visit if the difference is below 20. I have the following:

Code:
Public Function Cont20(MyVal As Long, MyDif As Long) As Long
Static OldValue As Long
Dim NewValue As Long
If MyDif >= 20 Then
NewValue = MyVal
OldValue = 0

[Code]....

Which I put as Cont20([Duration],[Difference])

The problem seems to be on the return aspect, its not calculating correctly. I had the formula in Excel which worked great, but this is proving troublesome. As a note the Excel formula was such that it would add the previous running total and then add the current duration and current diff. e.g. In cell A7 the formula would be A6+B7+C7 and so on.

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved