473,383 Members | 1,818 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Updating records through/around a Totals Query

8
On large invoices, it's better cash flow at times to pay only part now, part later. I tried using a totals query to build a recordset that show a listing of invoices that have balances owing with the original balance and the sum of any and all payments that have been made.

I am using this query to populate a form which would allow me to select which invoices I want to pay with this check (setting the control "paynow" to "yes") and how much I want to pay on each (setting the unbound control "payamt" to an amount less than the balance if I choose).

I got this far, only to realize that the form was not updatable. So, I went back to the Totals Query and found it was not updateable.

I'm using the tables and controls as follows for the query:

VenTbl
VenID
Vendor GroupBy Like [Select Vendor]

InvoiceTbl
InvID
Inv# GroupBy
InvDate GroupBy
InvAmt GroupBy
VenID GroupBy Lookup to VenTbl
PayNow GroupBy

PayDetailTbl
DetID
InvID Lookup to InvoiceTbl
PdAmtApplied Sum

The relation between InvoiceTbl and PayDetailTbl includes all records from InvoiceTbl and only those from PayDetailTbl where the joined fields are equal.

Ideas on how to make the record set updatable? It's probably something obvious, but after several hours of attempts and reading 'help', I'm stuck.

Thanks in advance,
Fresco
Dec 3 '07 #1
2 1669
Fresco
8
Fresco: more thoughts:

I've been thinking through the question I asked and it's non-sensical. A totals query combines the many side to total one or more of it's fields. Access wouldn't know which record in the many side to update.

So, I'll try something else. I'll use the totals query as the basis for a continuous form and add a command button which when clicked will open a second form with subform for just that one invoice with invoice #, vendor name & invoice date in the main form and any/all payments with check #s and dates in the subform.

I'll place a control on the main form showing how much I want to pay out of the remaining balance and with a command button, launch the Check report for printing the check.

Anyway, if you read these two posts and have a better idea/approach, let me know.

Fresco
Dec 4 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
Its a little confusing but I think I know what you are getting at. You could look at changing your structure slightly. The following structure is just an example.

tblInvoices
InvoiceNum (Primary Key)
InvoiceDate
InvoiceAmount
VendorID (FK reference to tblVendors)

tblChecks
CheckNum (Primary Key)
CheckDate
CheckAmount
VendorID (FK reference to tblVendors)

tblPayments
PaymentID (Primary Key)
CheckID (FK reference to tblChecks)
InvoiceNum (FK reference to tblInvoices)
PaymentAmount

This way your payments will record a reference to both the invoice and the check. You won't need to update anything as you will add a new record to tblPayments to show each part payment covered by the check and which invoice it is paid against.
Dec 11 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Jason | last post by:
Let's say I have an html form with 20 or 30 fields in it. The form submits the fields via POST to a php page which updates a table in a database with the $_POST vars. Which makes more sense? ...
7
by: Foxster | last post by:
in access i have two tables (tblplayer, tblpoints) in tblplayer i have field totalpoint (number) in tlbpoints i have field pointgame (number) the two files are related via idplayer now i made a...
1
by: Chris Jackson | last post by:
I'm a novice Access user and am not sure how to solve the following problem. Any help with the following would be greatly appreciated! I have two tables with identical structures, the first holds...
4
by: Laura | last post by:
Here's the situation: I'm trying to use an update query to copy data from one row to another. Here is the situation: I have 5 companies that are linked to each other. I need to show all 5...
4
by: Jim | last post by:
I have a form that is using a query for the control source. The query put the data in order of TOP 20. I've added an extra textbox in the form and want to be able to automatically rank the records...
5
by: JimmyKoolPantz | last post by:
Situation: I am writing a program that opens up a data file (file ext .dbf), imports the information into a dataset. The program also, searches through the dataset for key words ("company...
7
by: J-P-W | last post by:
Hi, in the past I've spent ages writing VB routines to get around this problem, is there a simple way? I have three tables for a membership system: tblMembership - MembershipNumber; Names etc...
4
by: tweeterbot | last post by:
Hi. I am working in Access 2000 in Windows XP. The problem I am having is very strange. My database has many tables and queries, but the relevant ones here are Pricing and Targets (table),...
2
by: srusskinyon | last post by:
I need some help getting unique records from our database! I work for a small non-profit homeless shelter. We keep track of guest information as well as what services we have offered for...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.