Search results

  1. Keith

    Conditional sum if problem

    Thanks Brian I did notice the smiley. Thanks for your formula it works a treat.
  2. Keith

    Conditional sum if problem

    I am creating a holiday planner. The range A2:C5 in the example below is populated from a user form. The name is selected on the user form using a combo box getting its data from F2:F5. Once the start and end dates are entered on the user form I have code that calculates the number of leave days...
  3. Keith

    Access to Word Automation

    Create a module and enter the following function code. (Code by Access to Go.) Then put this line in your code: strWordTemplate = GetCurrentDBpath(False, True) & "AccessToWord.dot" Function GetCurrentDBpath(Optional IncludeFileName = True, Optional IncludeFinalBackSlash = True) As String...
  4. Keith

    Where to insert the Where clause

    Thanks Uncle Gizmo for pointing me in the right direction. SELECT tblInvoiceHeaders.*, tblQuoteLayout.*, qryQuoteItems.* FROM tblQuoteLayout, tblInvoiceHeaders INNER JOIN qryQuoteItems ON tblInvoiceHeaders.InvoiceHeaderNum = qryQuoteItems.InvoiceItemHeader WHERE...
  5. Keith

    Where to insert the Where clause

    I have the following code as the record source of a report. It is not my code and I have a lot to learn about coding. SELECT tblInvoiceHeaders.* , tblQuoteLayout.*, qryQuoteItems.* FROM tblQuoteLayout, tblInvoiceHeaders INNER JOIN qryQuoteItems ON...
  6. Keith

    Nokia N70 & TomTom 5

    I have a Nokia N70 with TomTom 5 installed. I use a Bluetooth Sat Nav receiver. After about 30 minutes the phone drops the connection, If I then go to Change preferences/Show GPS status after a few seconds the connection is restored. Any ideas as to a solution please.
  7. Keith

    Hey Len's 60 today

    Belated happy birthday Len. Don't forget you'll get the winter fuel allowance next Christmas.
  8. Keith

    Syntax error in Insert Into Satement

    Thanks Paul & Matt - Problem solved
  9. Keith

    Syntax error in Insert Into Satement

    Thanks Matt well spotted. However I now get Runtime Error '3346' Number of query values and destination fields are not th same.
  10. Keith

    Syntax error in Insert Into Satement

    I am running the following code from a command button on a form. I am trying to write a number of records to a table dependent on the value of a text box (txtQuantityVeh) on the form. my code is: Dim SVE As String, number As Long For number = 1 To Me.txtQuantityVeh.Value...
  11. Keith

    How to get a query result into a form

    I have a query the SQL view is SELECT Max([customerID]) AS Total FROM tblCustomer WHERE (((Left([CustomerID],3))=[forms]![frmNewCustomer].[txtFirst3])); I run the query and the result is Total BIS007 How do I get Total into a text box on my form so that I can use it?
  12. Keith

    Record Count - What am I doing Wrong?

    Thanks Gemma I got it to work I missed the spaces between the & and the quotes which caused the problem. Code now strSql = "SELECT tblCustomer.LastName FROM tblCustomer WHERE ((Left([LastName],1)='" & strLetter & "'))" At least I've found out how to use the immediate window and debug print...
  13. Keith

    Record Count - What am I doing Wrong?

    silly me, missed space between & and " '. Many many thanks for your help
  14. Keith

    Record Count - What am I doing Wrong?

    Sorry put the code in the wrong place. I put it in a module and call teststr in immediate window gives no errors
  15. Keith

    Record Count - What am I doing Wrong?

    I typed call teststr in the immediate window and get Compile error: Sub or Function not defined
  16. Keith

    Record Count - What am I doing Wrong?

    I have tried both methods suggested but putting ' " & strLetter & " ' or ' " & me,txtLetter & " ' I get a compile error "Expected End of Statement". Without the double quotes I get a message box Runtime Error '3021' No Current Record. In the debug window both strLetter & me.txtLetter contain...
  17. Keith

    Record Count - What am I doing Wrong?

    Many thanks KernelK, I'll get the hang of using quotes hopefully Keith
  18. Keith

    Record Count - What am I doing Wrong?

    How do I reference a text box in the sql statement? i.e. Enter a letter in a text box and the sql statement select a record set of all last names beginning with that letter. I have tried Dim letter as String and inserting letter in place of the 'B', I have put it in single quotes and also...
  19. Keith

    Record Count - What am I doing Wrong?

    Many thanks for your prompt reply, my headache has gone.
  20. Keith

    Record Count - What am I doing Wrong?

    I am not trying to do anything specific but trying to learn more about Vb. I have learned much from this Forum but I am now stuck. I have a select query that gets all the customers from the customers table with the first letter begining with the letter "B" this is the SQL view:- SELECT...
Back
Top Bottom