Search results

  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...
  16. C

    Multiple Checkboxes to add multiple entries on a Table

    I kind of got to that conclusion but I wanted to be able to add more that one Course at a time. Like on the form that i mentioned having checkboxes for the different courses and by pressing OK it adds all of them
  17. C

    Multiple Checkboxes to add multiple entries on a Table

    Hi, I'm quite new to Access but after trying to having some problems doing a couple of reports I was recommended on this forum to Normalize the structure of the tables. I've done that and I can do all the reports I wanted but now I'm having another problem. I wanted that on form frmEDIT...
  18. C

    DCount with column as a Variable

    Date Is the Data on the picture I send. That´s the value i need to show
  19. C

    DCount with column as a Variable

    @Pat Hartman I'm trying to. I actually have the certifications divided in 3 groups. I added on the tblCert a second column with the group A question if you don´t mind. Using the organization you sugested I need a form with a dropdown selecting the PersonName from a query created and then I...
  20. C

    DCount with column as a Variable

    @Uncle Gizmo @Pat Hartman You are absolutely right but unfortunately I'm a beginner in access. I actually started with the structure you mentioned but I wasn't being able to populate the forms and I managed to do it with one single table. But is definitely that seems the way to go.
Top Bottom