Search results

  1. B

    Avoid duplicate records (overlapping dates)

    that's the one! thank you very much!!
  2. B

    Avoid duplicate records (overlapping dates)

    thank you! I'm still getting an error though This time 2471, the expression you entered as a query parameter produced this error: EndDate And then it highlights the dcount line. I'm uploading the db if it helps
  3. B

    Avoid duplicate records (overlapping dates)

    thank you all! Below is my code I'm still getting an error on the same line Please note that there is no enddate on the form i'm using. it's enddate=dur-1 Don't know if this is what's causing the issue Function DiagOverlapExists(StartDate As Date, Dur As Long, DiagID As Long, StudID As Long) As...
  4. B

    Avoid duplicate records (overlapping dates)

    Hello everyone! I've been trying to use the code below (created by chatgpt essentially) I'm essentially trying to pop a msgbox (and not save) whenever there is a given DiagID for a given StudID on overlapping days e.g. diagID 1 for studID 1 on 10-15 Jan (dur 6 days) already exists. User is...
  5. B

    Many-to-many relationship?

    Thank you very much what’s the purpose though of the junction table ? I assume each SportsGroupID will appear once on the SportGrpMbr table? Otherwise there is a chance that a student will appear twice in the same sportsgroup on different records i am not interested in details about the...
  6. B

    Many-to-many relationship?

    Hi all I have a database that includes the following tables Students (firstname, lastname, ID, med_check) . Med_check is a date when each student last had a medical check (which is valid for 1 year). It may even be blank Sport_groups (ID, name, students.ID). Each sport group can contain more...
  7. B

    Dropdown list based on a query?

    Hi all I have a table that includes names of students. Duration of studies is 4 years and each year new students come in and others graduate. There is a table (students) with everyone's names, last names and unique IDs I have then created a query that runs every time I want to create a report...
  8. B

    PIVOT Tables

    thank you Actually my first query was fine I understand it may be long and messy but I essentially have zero experience What I did is I created a pivot table (using the wizard) based on my query1 TRANSFORM Sum(Query1.Expr3) AS SumOfExpr3 SELECT Query1.lastname, Query1.firstname FROM Query1...
  9. B

    PIVOT Tables

    thank you that was very helpful
  10. B

    PIVOT Tables

    Hi all I've only just started getting more familiar with MS Access and SQL I have a table which contains patients details (firstname, lastname, id) and another one where it shows the dates of their admissions accross 4 different wards (from a dropdown list) in a hospital (e.g. 19/8/23-23/8/23...
  11. B

    JOIN multiple tables

    thank you can you be more descriptive though? I'm still too amateur I'm afraid Is it SELECT FirstName, LastName, ID, diagnosis, dstartdate, denddate, admissiondate, dischargedate, [startdate] AS expr1, [enddate] AS expr2 FROM Table1 INNER JOIN Table2 ON table1.ID=table2.ID This is how far I've...
  12. B

    JOIN multiple tables

    Hello I have 3 tables Table1: FirstName, LastName, ID Table2: ID, diagnosis (dropdown list), dstartdate, denddate Table3: ID, admissiondate, dischargedate I want to create a query that will display the IDs and the dstartdate and denddate from table 2 and admissiondate and dischargedate from...
  13. B

    Solved Display date on the report

    thank you! that actually did the job!
  14. B

    Solved Display date on the report

    thank you very much! I somehow managed to do it for one of my reports but not for the others. I'm not actually sure how I did it. I didn't create any new forms or queries Do you mind being more descriptive? As I said I'm still too amateur and can only follow simple instructions (I'm sorry!!) If...
  15. B

    Solved Display date on the report

    Hi all I am not yet fully familiar with MS access so this may be an easy one for some of you I have a table with some patients information and then another one with their hospital admissions. All of them have an admission date but only some of them have a discharge date (cause they are still in...
Back
Top Bottom