Search results

  1. B

    Adding count column to record matches over multiple fields

    Hi all, Is it possible to add a column to the below to record how many instances of a matching customer, for the same broker occur on the same date :- SELECT q.QUOTEID, c.CUSTOMER_NAME, b.BROKERAGE_NAME, q.REQUESTED_SSD FROM ((TBLQUOTESNEW q LEFT JOIN TBLBROKERAGESNEW b ON q.BROKERAGE_ID =...
  2. B

    Count data by column

    Hi all, The following gives me a count for a specific date SELECT Count(d.DATE_SENT_TO_REGISTRATIONS) FROM tbldata d WHERE (((d.DATE_SENT_TO_REGISTRATIONS)=#9/25/2017#)); How do I need to adapt this so I have 2 columns returned, and the second column's data being for the date 9/24/2017?
  3. B

    One users data not updating from Oracle tables

    Hi, I have an Access front end, used by around 10 people, which has around 20 linked Oracle tables. Every user is using the same version of the front end. Only one user in particular is having an issue. When they try and change values in the tables, they get ODBC errors, and DUMs, etc return...
  4. B

    Returning value from other table

    Hi, I have the following query which returns Yes or No if a Stage value is found in tblCommissionNew SELECT Quote_ID ,Max(IIf(Val([Stage]) = 1, 'Yes', 'No')) AS Stage_1_Calc ,Max(IIf(Val([Stage]) = 2, 'Yes', 'No')) AS Stage_2_Calc ,Max(IIf(Val([Stage]) = 3, 'Yes', 'No')) AS Stage_3_Calc...
  5. B

    Relating 2 tables to one table

    Hi, I have a feeling this should be simple, but for some reason it has me stumped... I have the following 2 tables (and fields) :- tblquotes QUOTEID CUSTOMER_CONTACT_ID BROKER_CONTACT_ID tblContacts CONTACTID A quote can have just one Customer contact and one broker contact. Both Customer...
  6. B

    Returning distinct rows meeting condition

    Hi, I have a table in the format below (with sample data) tblquotes QuoteID / PetType 123 / 16 123 / 16 123 / 17 456 / 14 789 / 15 How can I distinct rows where a PetType of 16 does not exist for a QuoteID? So my returned results would be :- QuoteID 456 789 Thanks in advance
  7. B

    Disable image click

    Hi, I have some images on my form that I'm using as buttons, based on On Click Under certain circumstances, I'd like to disable these "buttons". Is there a way to do this, as I can't find an Enabled property. Thanks
  8. B

    Query by Max and Len

    Hi all, I have the following query which returns the last 5 digits of a statement number :- SELECT DISTINCT b.Brokerage_Name, Max(Right([Statement_Number],5)) AS Expr1 FROM tblBrokeragesNew b LEFT JOIN tblStatementsNew s ON b.ID = s.Brokerage_ID GROUP BY b.Brokerage_Name; How can I amend this...
  9. B

    Form not focused when opened

    Hi, I'm opening a form in VBA using the following :- DoCmd.OpenForm "frmBrokerAcc", acNormal The form opens, but focus remains on the original form. I've tried setting focus to a control on the opened form :- DoCmd.OpenForm "frmBrokerAcc", acNormal DoCmd.SelectObject acForm, "frmBrokerAcc"...
  10. B

    Keeping Excel hidden until export is complete

    Hi all, I am exporting various types of data from Access to Excel using Dim excelApp As Object <snip> Set excelApp = CreateObject("Excel.Application") I then do some formatting, etc in Excel via Access VBA This all works perfectly. What I would like to do though, purely for aesthetics, is...
  11. B

    Option to merge query (using subquery)?

    Hi, I have 2 queries :- SELECT tblBrokeragesNew.ID, tblBrokeragesNew.Brokerage_Name FROM tblQuotesNew RIGHT JOIN tblBrokeragesNew ON tblQuotesNew.Brokerage_ID = tblBrokeragesNew.ID GROUP BY tblBrokeragesNew.ID, tblBrokeragesNew.Brokerage_Name HAVING...
  12. B

    Access table to Oracle

    Hi all, I need to move some data from my Access database to Oracle. To setup the oracle tables, I need a Make Table query that "makes" my Access table (data types, etc) Is there a way to do this, in or out of Access? Thanks in advance
  13. B

    Summing multiple fields in single query

    Hi have the following query :- SELECT t1.QuoteID, t1.Supply_Num, t2.Cost AS Stage1Cost FROM qryCML as t1 LEFT JOIN tblCommissionNew as t2 ON t1.QuoteID = t2.Quote_ID WHERE (((t2.[stage])=1)) GROUP BY t1.QuoteID, t1.Supply_Num, t2.Cost; This results in 3 columns, one of which is a total where...
  14. B

    Select Case with Listbox

    Hi all, I have a listbox on a form, populated by VBA. The values on the listbox are dynamic, depending on query results, in this way :- Me.lstReports.AddItem "Puppy (" & RS.Fields(0) & ")" I want to create events based when the user double clicks the listbox. I was doing this using a select...
  15. B

    DCount using multiple criteria using AND

    Hi all, I have a text box on my form, who's control source is [CODE]=DCount("Quote_ID","tblNotesNew",("Quote_ID =" &
  16. B

    Adding saved records's ID to another table

    Hi all, I have a form where after saving (clicking "save") for a new record, I want that new record's autonumber ID to be added to a table, only if it doesn't exist in that table. I know how to add records to a table. Where I'm struggling is getting the saved form's ID, and then efficiently...
  17. B

    Not detecting dirty form

    Hi all, I have a continuous form (no subforms) that is populated by a query. On the form I have a checkbox that changes the forms recordsource via SQL ,via VBA. Each record on the form has a textbox where the user can enter a value. I want a message to be displayed if the checkbox is...
  18. B

    Possibility of consolidating 2 date based queries into 1

    Hi, I have 2 queries as per below that count 3 sets of data from one table by date, and then group by month. The queries are :- SELECT Format([Date_sent_to_Registrations],"mmm-yy") AS Period, Count(tblQuotesNew.Date_sent_to_Registrations) AS xCount...
  19. B

    Options for speeding up populating form based on union query

    Hi all, I have a dashboard with 15 textboxes. In short this layout can't change. I was populating the boxes with one query each when the form opened, and they populated fairly quickly. In order to reduce the number of queries, I merged them all into one union. I populated the textboxes by...
  20. B

    Primary Key Issue

    Hi, I have 3 tables, tblQuotes, tblCommission and tblNotes. Each quote can have multiple notes. In tblNotes I have a Quote_ID, which I have related to QuoteID (PK) in tblQuotes. Each quote needs to have 6 commissions. I'm not sure how to relate this as I've already used tblQuotes' PK for...
Top Bottom