Recent content by AndyCompanyZ

  1. A

    Report from combobox

    Now when I run it produces the report but with no information only headers.
  2. A

    Report from combobox

    Hi all It's been a while since I've posted on here (feels like confession). I am trying to get a report based on a selection from a combobox. The issue is many fold. Firstly I have been playing around with it so much that I have messed up the syntax and can't remember what I had. Here is what...
  3. A

    Date module

    Aha made a bit of progress now have; Dim Workingdays As New clsWorkingDays If Me.cmboCommunicationName.Value = 1 Then Me.CommunicationDueDate = Workingdays(Forms![frmMainNavigation]![NavigationSubform].Form![EventStartDayDate], -7) End If But now it gives me "object doesn't support this...
  4. A

    Date module

    I am experimenting and now have: Dim Workdays As New clsWorkingDays If Me.cmboCommunicationName.Value = 1 Then Me.CommunicationDueDate = WorkingDays([EventStartDayDate], -7) End If But this gives me a expected variable or procedure not module error
  5. A

    Date module

    I have a quick question I am trying to call a module (clsWorkingDays) and calculate 7 days before another date. this is my first attemot at module use and I'm not sure what i'm doing so far I have; Dim clsWorkingDays As Workdays Set Workdays = New Workdays If Me.cmboCommunicationName.Value...
  6. A

    Dlookup with date

    Thanks for that It does compile now but doesn't do what I thought it would. I thought it would work out the days up to 14 days before the date selected in the form but I think it works out just 14 days and not upto. Does anyone know how to do what is needed. I imagine I will need 2 bits of code...
  7. A

    Dlookup with date

    Thanks Is this right for the delimiters: If DLookup("[EventStartDate]", "tblEventDelegate", "DelegateID = " & Me.DelegateID " And EventStartDate = " & #DateAdd("d", -14, [Me.txtEventStart])#) Then
  8. A

    Dlookup with date

    I have posted this on another access forum but thought i'd try here too. I am writing some code for a combobox on click event. I need to check the date that has been selected in the combobox against a table (tblEventDelegates) that holds a list of delegates who have been scheduled onto events...
  9. A

    Dcount problem

    Thank you so much I knew I was near but I didn't realise about the separate parentheses around the second part. Dlookup syntax is never quite straightforward it seems.
  10. A

    Dcount problem

    Thanks for that but it still gives me a problem. I tried: =DCount("[Status]","tblEventDelegate","[EventID]=" & [Forms]![frmMainNavigation]![NavigationSubform]![EventID] & " AND ([Status]=1 or [Status] =2") But that gives an #error and I tried...
  11. A

    Dcount problem

    I have a DCount on a textbox on a form that is supposed to pull up the number of delegates scheduled or invited (status 1 or 2) form a table tbleventdelegate. I have the following code: =DCount("[Status]","tblEventDelegate","[EventID]=" & [Forms]...
  12. A

    Too few parameters expected 1

    I put the msgbox in and the date it returned was correct but when I ran the rest of the code again it said too few parameters expected 1. I changed the date slashes the other way / as well.
  13. A

    Too few parameters expected 1

    I've tried that but to no avail I now have; Set Rs4 = CurrentDb.OpenRecordset("Select * From tblFacultyEvent Where FacultyID =" & Me.cmboFacultyEvent & " And EventEndDay = #" & Format(Me.Parent!EventEndDate, "mm\dd\yyyy") & "#") as the offending line but it says syntax error what I'fd like to...
  14. A

    Too few parameters expected 1

    Thanks to both of you I've tried jzpw22' s suggestion as yes it is a date field but it gave the same error. I'm just trying spike's test using strSQL but I'm not sure how to run it as its giving me an argument not optional error on the code's first line: Set Rs4 = CurrentDb.OpenRecordset
  15. A

    Too few parameters expected 1

    I have the above error come up on the following piece of code on the highlighted line: Dim Rs4 As DAO.Recordset Set Rs4 = CurrentDb.OpenRecordset("Select * From tblFacultyEvent Where FacultyID = " & Me.cmboFacultyEvent & " And EventEndDay= " & Format(Me.Parent!EventEndDate...
Top Bottom