Recent content by cybersardinha

  1. C

    Dcount Null

    yes both are VBA values. the mFB contains the table name and the sExpired contains a date that is calculated by subtracting a number of months to the current date.
  2. C

    Dcount Null

    I've tried it, the first option just gives me the < sExpired count and the second one stops the code and doesn't give any output.
  3. C

    Dcount Null

    Hi, I'm hitting a bit of a problem. I have this formula on VBA: ngultig = DCount("*", sTblName, mFB & " < " & sExpired) It works and it gives me the right results but I wanted it not only to count the values inferior to sExpired but also the fields that are empty/null on that column. Is...
  4. C

    Show Null Values

    Thanks, I've changed the field name. I did that command with the query assistant. When I change to LEFT JOIN i get an error that says something like JOIN-expression not used (I don't have access in English so I just translated)
  5. C

    Show Null Values

    Hi, I have made a query: SELECT tblPerson.PersonName AS Name, Last(tblPersonCert.CertDate) AS Datum FROM tblPerson INNER JOIN (tblCert INNER JOIN tblPersonCert ON tblCert.CertID = tblPersonCert.CertID) ON tblPerson.PersonID = tblPersonCert.PersonID GROUP BY tblPerson.PersonName...
  6. C

    Solved Add a SQL INSERT INTO command

    So I managed to figure it out.... I had 2 Problems one was that I wasn't referring to the table correctly and second the date wasn'tformated. The code that works for reference is: Dim sCertID As String Dim sPersonID As String Dim dCertDate As Date sCertID = "31" sPersonID = Me.PersonID.Value...
  7. C

    Solved Add a SQL INSERT INTO command

    :o that might be the problem then. i got that code from https://www.niftyaccess.com/insert-into-sql-statement/
  8. C

    Solved Add a SQL INSERT INTO command

    I've added the database here for reference. It's on the frmEDIT form
  9. C

    Solved Add a SQL INSERT INTO command

    No :( I now a bit of vba but it's all self learned from the internet and trial and error. I've just added a second DebugPrint after "strSQL0 = strSQL1 & strSQL2" and i get: INSERT INTO tblPersonCert_INSERT_INTO_SQL(PersonID, CertID, CertDate) Values(3, 31, 23/03/2022)
  10. C

    Solved Add a SQL INSERT INTO command

    I don't get an error message... on this code I get the first Debug.Print other than that nothing happens This code is inside a Button Click event
  11. C

    Solved Add a SQL INSERT INTO command

    Yes I edit it because i initially copied the wrong code xD The actual one is: Dim sCertID As String Dim sPersonID As String Dim sCertDate As Date sCertID = "31" sPersonID = Me.PersonID.Value sCertDate = Me.CertDate.Value Debug.Print sPersonID; " + "; sCertID; " + "; sCertDate Dim strSQL0 As...
  12. C

    Solved Add a SQL INSERT INTO command

    I have a space at the end of the strSQL1 because of that
  13. C

    Multiple Checkboxes to add multiple entries on a Table

    Thanks for all the info :)
  14. C

    Solved Add a SQL INSERT INTO command

    Where is missing a space? I might be going blind for looking at this but I can't seem to find a missing space xD
  15. C

    Solved Add a SQL INSERT INTO command

    Hi, I already got a lot of help in the forums and following the advice I have normalised my tables. I'm trying to write some vba script to add new records to a table but it's failing and I can't figure out why. This is the code: Dim sCertID As String Dim sPersonID As String Dim sCertDate As...
Top Bottom