Search results

  1. S

    Calculate more than 1 sum of the same field in a SQL statement

    Hi, Is it possible to calculate more than 1 sum of the same field in a SQL statement/ I want a result like the following. Ordered Done Pending ----------------------------------------------------------- 10 8...
  2. S

    Left Outer Join not returning all rows

    Hi I have the following query: SELECT tblAppTypes.appType, tblAppTypes.appTypeID, Count(tblOrders.OrderID) AS Orders FROM tblAppTypes LEFT JOIN (tblApplicants LEFT JOIN tblOrders ON tblApplicants.appID = tblOrders.AppID) ON tblAppTypes.appTypeID = tblApplicants.appType WHERE...
  3. S

    Report with each group in a new column

    Hi, I'm trying to build a report with each group in a new column similar to 'Products by Category' report in the Nwind example. I've set it such that 2 groups appear on a page. The problem is that the 1st group appears in the middle of the first page and only 1 group appears on the 1st page...
  4. S

    Prevent saving record if no details in subform

    Hi, I have a bound form Invoice and a bound subform InvoiceDetails joined by InvoiceID. How do I prevent saving a record in tblInvoice if the InvoiceDetails section is empty?
  5. S

    Get values of a field from subform in datasheet view

    Hi, I'm trying to get all values of a field from a subform in datasheet view using the following code: Dim rs As DAO.Recordset Set rs = Me.sbfrmMySubForm.Form.RecordsetClone Do While Not rs.EOF strMyValues = "" & Forms!frmMyMainForm!sbfrmMySubform!MyField & "" Loop MS Access...
  6. S

    Limit rows in subform based on field in main form

    Hi, I have a frmOrders and sbfrmOrderDetails linked by OrderID. I want to limit the records on sbfrmOrderDetails based on a field TotUnits on the mainform. So, if the user enters 5 as the value in TotUnits, only 5 records are to be entered in the sbfrmOrderDetails. This is the code I'm using...
  7. S

    Displaying fields from 5 tables on a form

    Hi, I've attached my relationship diagram. I want to create 'frmInvoice' which displays the following fields: All fields from 'tblInvoices' ServiceID, AppID from 'tblOrders' addLine1, addLine2, addLine3, town, county, postCode from 'tblAppAddresses' Also I want to let the user select...
  8. S

    Invoicing: Best Practice?

    Hi, I have a table 'Orders' and another 'OrderDetails' with a 1:M relationship. I want to know what would be the best way to handle invoicing. Usually payments are made when an order is placed. But there are cases when a payment is made after the order is fulfilled. Usulally, an Order would...
  9. S

    Updating table with value from calculated unbound field on form

    Hi, I have a form with a calculated unbound field - Tot. The control source of Total is set to = F1 + F2 where F1, F2 are bound fields on the same form. I've set the AfterUpdate event of Total to DoCmd.RunSQL ("UPDATE tbl SET Total = " & Me.Total.Value & " WHERE ID = " & Me.ID.Value & "")...
  10. S

    Sequential Numbers ON.001, ON.002

    Hi, I have a form frmOrder and a subform sbfrmOrderDetails. The PK OrderID for tblOrders is a autonumber. I want to create a sequential ID for tblOrderDetails such that OrderDetailID would be 8888.001, 888.002 etc. for OrderID 8888 and 8889.001, 8889.002 etc. for the next OrderID. I've...
  11. S

    Change 1:1 relationship to 1:M

    Hi, I have a table 'User' and another 'Address'. The userID is included in the 'Address' table as a FK. I'm using Access 2002 and when I go to edit the relationship, it is automatically set as a 1:1 relationship. How do I change it to 1:M? Thanks.
Top Bottom