Search results

  1. T

    Send email via GMail

    That's it Thanks very much
  2. T

    Send email via GMail

    I need to send email using GMail and have the following code: Public Sub SendEmailGmail() Dim NewMail As CDO.Message Dim mailConfig As CDO.Configuration Dim fields As Variant Dim msConfigURL As String Dim db As DAO.Database Dim rstAttachments As DAO.Recordset Dim rstGmailSettings As...
  3. T

    Insert Into Syntax issue

    Thanks very much
  4. T

    Insert Into Syntax issue

    Thanks MajP Format function worked. But why the Now + 0.5? Date saved is tomorrow!
  5. T

    Insert Into Syntax issue

    Thanks Minty Debug print gives me: INSERT INTO tblBackEndLocation(BackendLocation, ComputerDescription, dDate) VALUES ('C:\Users\timpe\OneDrive\Data\MyData.accdb', 'Tim Laptop', #27/04/2021 15:31:33#) Which looks fine to me?
  6. T

    Insert Into Syntax issue

    I have been staring at this for hours and can't see the syntax problem CurrentDb.Execute "INSERT INTO tblBackEndLocation(BackendLocation, ComputerDescription, dDate) VALUES " & _ "('" & pubFilePathName & "', '" & strQuestion & "', #" & Now() & "#)", dbFailOnError...
  7. T

    Search By Time

    Thanks so much Didn't know about function "TimeValue" Thanks
  8. T

    Search By Time

    I have the table "tblTempTrainingDateTime" It contains the fields: TrainingTimeId - AutoNumber TrainingTime - Date/Time & Format = Short Time I have a record where the TrainingTime = 10:00:00 Why does the following return a null value? lngTrainingTimeId = DLookup("TrainingTimeId"...
  9. T

    Reduce repetive code on multiple forms

    Thanks very much How do I pass the name of the list box "lstCustomerContacts" and field "lngCustomerContactId" These will change for each form Thanks
  10. T

    Reduce repetive code on multiple forms

    On a form I have the following code Private Sub ShowCustomerContactDetailsForm() Forms![frmCustomer]![frmCustomerContacts].Form!lngCustomerContactId = Forms![frmCustomer]![frmCustomerContacts].Form!lstCustomerContacts.ItemData(0)...
  11. T

    Merge records from 2 queries as one record in a new query

    I posted a question earlier on how to return first and last dates by year: https://access-programmers.co.uk/forums/showpost.php?p=1614857&postcount=1 Colin (isladogs) kindly solved this for me. In his solution, the Union query returns 2 records. One for the first date, and one for the last date...
  12. T

    Query to return first and last dates by year

    I have a table with the fields: dDate and Value The table has numerous records spanning many years I need a query that will return the first and last date for each year. e.g 1/1/2016 15/11/2016 4/2/2017 30/12/2017 3/1/2018 30/11/2018 How do I do this? Thanks in advance
  13. T

    Stop looping through Excel rows

    Thanks very much
  14. T

    Stop looping through Excel rows

    I use the following to loop though rows in an Excel spreadsheet For Row = 1 To CountRow code that checks value in cell Next Row If the code checking the value in the cell meets certain criteria, I want to stop the loop. How do I do this? Thanks
  15. T

    Convert string to date

    I have the string: 01 April 2016 How do I convert it to a date, in the format: 01/04/2016? Need to cater for all months of the year! Thanks
  16. T

    Filter Recordsets

    I have a dao.recordset called "rstPurchaseOrder" which contains SupplierId, ProductId & CurrencyId which I want to use to create purchase orders. I need create a purchase orders for each supplier and currency. Each purchase order may only have one currency. How do I loop & filter the recordset...
  17. T

    CreateQueryDef Error 3265

    I am having the exact same problem as LW_Access I have a attached a copy of a sample database. It contains only one table, "tblInvoice" I need to learn how to create a qryDef So using the table, I need a qryDef that will return all invoices between a date range and where the field...
  18. T

    Matched Query

    Thanks CJ_London plog, you are 100% correct. Just wasn't thinking straight. Think it is time to quit for the day and have a glass off....
  19. T

    Matched Query

    I am looking for a query that will return records from a table that have related records in another table. Opposite to the Unmatched Query Wizard I have two tables: tblSupplier and tblSupplierProducts The two tables are related by the field "SupplierId" I need the query to only return...
  20. T

    Filter list box on form by using a control on the form

    Hi CJ Many thanks for this Can you please explain: [CustomerStatusId]=[optCustomerActive] Or [optCustomerActive]=3 I don't understand the logic!
Top Bottom