Recent content by TimTDP

  1. T

    Requering listbox records based on another listbox

    Thank you so much
  2. T

    Requering listbox records based on another listbox

    Thanks for the help so far. But I simply cannot get it to work! I have attached the database. On the form that opens is a button. If the button is pressed, the second record in lstPaymentDate should be selected and lstSelectEmployee requeried. Thanks in advance
  3. T

    Requering listbox records based on another listbox

    I have 2 list box's on a form lstPaymentDate = SELECT DISTINCT PaymentDate FROM tblPayment ORDER BY PaymentDate DESC; lstSelectEmployee = SELECT tblPayment.EmployeeWageId FROM tblPayment WHERE (((PaymentDate) Like [Forms]![frmPrintPayment]![lstPaymentDate])); Private Sub...
  4. T

    Send email via GMail

    That's it Thanks very much
  5. 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...
  6. T

    Insert Into Syntax issue

    Thanks very much
  7. T

    Insert Into Syntax issue

    Thanks MajP Format function worked. But why the Now + 0.5? Date saved is tomorrow!
  8. 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?
  9. 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...
  10. T

    Search By Time

    Thanks so much Didn't know about function "TimeValue" Thanks
  11. 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"...
  12. 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
  13. 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)...
  14. 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...
  15. 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
Back
Top Bottom