Search results

  1. L

    Can two queries be re-written into a single query?

    Hello, I was just wondering if the following two queries can be re-written into one single query or is this not do-able? They are based off a many-to-many relationship between tblPeople and tblJobs with a link table called tblLinkPeoplesJobs in the middle. I am pretty much an SQL novice, so...
  2. L

    Message to inform a record already exists

    Hello, I have three tables on my database - tblPersons, tblJobs and tblLinkPersonToJobs. It is a many to many relationship via the link table as many persons can be linked to many jobs. I have two list boxes on my form (list0 and list35) where I select at least one person from list0...
  3. L

    Query question - how to display an expression field if certain criteria is met?

    Thank you, I will take a look at the database this afternoon.
  4. L

    Query question - how to display an expression field if certain criteria is met?

    I cannot get the first query to return any results. If I use the example table and it’s data, the first query will run, but no results are displayed, just the headings. I've attached the example database.
  5. L

    Query question - how to display an expression field if certain criteria is met?

    The table structure (at least for trying to work it out) is as simple as possible, personID (Primary Key), (Autonumber) LastName (short text) FirstName (short text) Task (Number) TaskDate (Date/Time) In the screen shot, Mike Smith get a certificate (for completing the tasks 1,2 and 3), Dave...
  6. L

    Query question - how to display an expression field if certain criteria is met?

    This was my first attempt Certificate:IIf([Task]="1","CERTIFICATE",IIf([Task]="2","CERTIFICATE",IIf([Task]=“3”,”CERTIFICATE”,"No Certificate")))
  7. L

    Query question - how to display an expression field if certain criteria is met?

    I've just tried the IIf statement, I have created a table at home, with tasks. But the statement produces "certificate" for every task.
  8. L

    Query question - how to display an expression field if certain criteria is met?

    I haven’t had chance to try it yet, I will when I’m back at my laptop in the morning.:)
  9. L

    Query question - how to display an expression field if certain criteria is met?

    Unfortunately I’ve never made a public function. I’ve done basic run sql commands in VBA and including basic if statements , but never a public function.
  10. L

    Query question - how to display an expression field if certain criteria is met?

    If they have done tasks 1 & 2 print certificate. And if they have done 1,2 & 3 print same certificate. Anything else, don’t print certificate. What would be a good alternative to a nested IIf statement?
  11. L

    Query question - how to display an expression field if certain criteria is met?

    It is a bit confusing, If they complete 1 & 2 then they get a certificate. If they complete 1, 2 & 3 then they get the same certificate for reasons beyond this thread! (Basically the certificate will get an extra hand-written signature on it). If they complete 1 & 3, then no certificate. If...
  12. L

    Query question - how to display an expression field if certain criteria is met?

    Hello, I need to create a query which shows when users have completed at least two or three particular tasks out of a bigger amount of tasks. I have a table displaying users details and the tasks they have completed to allow them to be given a certificate. There are about 8 tasks in total but...
Top Bottom