Recent content by topdesk123

  1. T

    Query result wrong when field is 0

    Using the # sign could be throwing it off. Here's another formula you can try: IIf([PASSAGE#] <= 0 Or [PASSAGE#] < 5 Or [FAILURE#- ESSA] > 1, "No", "Yes")
  2. T

    Solved Property Sheet not displaying.

    Are you using dual monitors? I have found that properties show up on the other monitor in this configuration.
  3. T

    Adding a new record and getting ID

    Duplication is avoided here: If DCount("*", "[Projects]", "[ProjectNo] = '" & Me.ProjectNo & "'") > 0 Then MsgBox "This project number already exists" Me.Requery DoCmd.CancelEvent
  4. T

    Adding a new record and getting ID

    This is what I use to assign a new project number: Maybe it can work for you? Private Sub NewProjbtn_Click() DoCmd.GoToRecord , , acNewRec Me.CreateDate = Date If DCount("*", "[Projects]", "[ProjectNo] = '" & Me.ProjectNo & "'") > 0 Then MsgBox "This project number already exists" Me.Requery...
  5. T

    Solved Unable to trigger event when 2 fields are equal.

    Good morning! I would trigger the code on the after-update event of the form. HTH.
  6. T

    Syntax error

    Onto the next issue. I need to grab the items selected from the other listboxes and create a final criteria string. I have no idea where to start. This is what works for the first listbox: sSql = "SELECT * FROM masterquery WHERE topersonid IN (" For Each Lmnt In ctlList.itemsselected sSql =...
  7. T

    Syntax error

    I wouldn't kid Gasman, I have no idea why though!
  8. T

    Syntax error

    Well this works: (note, I removed a comma between acviewpreview and ssql. sSql = "SELECT * FROM masterquery WHERE topersonid IN (" For Each Lmnt In ctlList.itemsselected sSql = sSql & ctlList.ItemData(Lmnt) & "," Next sSql = Left(sSql, Len(sSql) - 1) & ")" 'Remove Last comma and single...
  9. T

    Syntax error

    When I click the button to run the report, I get a syntax error highlighting this line: DoCmd.Openreport Forms![FMainMenu]![FReports].Form![ReportName].Column(3), acViewPreview, , sSql Thanks!
  10. T

    Syntax error

    Hi! I'm trying to run a report that is filtered by a form that contains several text fields and multi-select list boxes. I am working on one section right now and I'm getting a syntax error. If I run the sql by itself, I get correct data. Here's the code: Variant Dim sSql As String Set...
  11. T

    Multiple list boxes as report parameters

    In regards to the above post, looking for opinions, do you think it's quicker to perform the filter in an "On format" event of the report, or on a command button that opens the report with criteria? Thanks!
  12. T

    Multiple list boxes as report parameters

    Good morning! Here is a link to the original db I inherited (too big to post no matter what I do).https://www.dropbox.com/s/7gmo620ep909kyz/PT_FE_New_Fast_Testb%20-%20Copy.zip?dl=0 The section I am trying to re-write is the reports, right now, it takes the users about an hour to run the sales...
  13. T

    Multiple list boxes as report parameters

    I will try to get one posted tomorrow. I started to clean it out and screwed it up. Hubby's hungry...must feed him. :-) TTYT.
  14. T

    Multiple list boxes as report parameters

    Yep, that looks about right. Good point about the salesmen, I was contemplating that as well, so in the first criteria what would my syntax be? Since I need both salesmen on the report, with each of their related information...ugh...mental gymnastics at work. THANKS!
  15. T

    Multiple list boxes as report parameters

    I just found out that the list boxes NEED to be multi-select. :-(
Top Bottom