Search results

  1. B

    Syntax error (missing operator) in query expression

    Thanks for the perspective. The principal outstanding is actually a field value - and not a calculated one - but I get the point. I've followed your thoughts on two queries and have found a good solution that way - thank you!
  2. B

    Syntax error (missing operator) in query expression

    Hello, I'm using an IIF statement to display the results of another expression I've created in the query (i.e. if one of them is blank, select the other). I'm getting a syntax error when running the query: SELECT [Credit Portfolio].[Credit Specialit Assigned], [Credit...
  3. B

    Seems silly -- but query not returning the right result...

    ARgh! I'm a dummy -- the field was formatted as text. Changed the field definition to DATE/TIME -- and works fine.
  4. B

    Seems silly -- but query not returning the right result...

    Tried that - but same results. When I change the query to =#9/9/2015# it returns that value. Maybe need to check on the format of the field in the table?
  5. B

    Seems silly -- but query not returning the right result...

    Makes sense / will try when I log in later tonight
  6. B

    Seems silly -- but query not returning the right result...

    I feel dumb asking this -- but I've been banging my head against the wall all day. Here's the query: SELECT pipeline_won_lost.Business, pipeline_won_lost.[Primary Officer Last Name], pipeline_won_lost.Status, pipeline_won_lost.[Actual Close Date] FROM pipeline_won_lost WHERE...
  7. B

    Need help in writing VB code to loop through a List Box and create separate PDFs

    Eureka!!!!!! Works Phew. Thank you for all of your help!!!!!!
  8. B

    Need help in writing VB code to loop through a List Box and create separate PDFs

    I think I got it (will test when I get home): Dim i As Integer Dim lbox As ListBox Dim myPath As String Dim strReportName As String Dim varItm As Variant Dim str As String str = "" Set lbox = Me!List0 myPath = "C:\Users\ROSENBR\Documents\BRC\Report\" If lbox.ItemsSelected.Count = 0 Then...
  9. B

    Need help in writing VB code to loop through a List Box and create separate PDFs

    OK - went back and used the code you wrote: Private Sub Command3_Click() Dim ctrl As Control Dim i As Integer 10 On Error GoTo btnrun_Click_Error 20 Set ctrl = Me.List0 30 For i = 1 To ctrl.ItemsSelected.Count 'Process/loop through selected...
  10. B

    Need help in writing VB code to loop through a List Box and create separate PDFs

    I tried it -- but kept getting the first X number of salespeople in the list...not the specific ones I picked. Ideas?? I've been playing with using "For Each varItm In lbox.ItemsSelected", but having trouble passing the resulting salesperson value to the OpenReport line: Private Sub...
  11. B

    Need help in writing VB code to loop through a List Box and create separate PDFs

    Thanks for doing the mock up. Following your logic, I've got the following (ignore the commented lines from a previous version of the code): Private Sub Command3_Click() Dim i As Integer Dim lbox As ListBox Dim myPath As String Dim strReportName As String Set lbox = Me![List0] myPath =...
  12. B

    Need help in writing VB code to loop through a List Box and create separate PDFs

    Yes, for each salesperson, a report (based on that salesperson) is generated and saved. Then the next, etc. Once complete -- that's it.
  13. B

    Need help in writing VB code to loop through a List Box and create separate PDFs

    Sorry if my last couple of posts were unclear -- several of them were made late last night! The reason I need looping, is that I want to create a SEPARATE report for each salesperson selected from the LIst Box. So, as an example, if I select Bob, Joe, and Mary, I want to create three separate...
  14. B

    Need help in writing VB code to loop through a List Box and create separate PDFs

    So - I've re-written the code a bit....not getting errors....but the code is not passing the value from the List Box to the report -- so I'm getting a blank report. Private Sub Command3_Click() Dim i As Integer Dim lbox As ListBox Dim myPath As String Dim strReportName As String Set lbox =...
  15. B

    Need help in writing VB code to loop through a List Box and create separate PDFs

    And yes....I plan on select multiple salespeople from the List Box on the form prior to running the code.
  16. B

    Need help in writing VB code to loop through a List Box and create separate PDFs

    I modified the query to use the new LIst Box form as its criteria Private Sub Command2_Click() Dim intCounter As Integer Dim cboCode As ListBox Set cboCode = Me![List0] For intCounter = 0 To cboCode.ListCount - 1 'set the list to the next item cboCode = cboCode.ItemData(intCounter)...
  17. B

    Need help in writing VB code to loop through a List Box and create separate PDFs

    I am confused -- not sure how to proceed. I just want to be able to select multiple items in my List Box, then have the code generate reports (one at a time) for each item selected. Do I need to re-write the query the report is using so it references my new List Box control name (List0) as...
  18. B

    Need help in writing VB code to loop through a List Box and create separate PDFs

    Yes - but in this case, I'm trying to automate the report using a different control (a List Box vs the original Combo Box I used in the individual report). That control is List0. I'm using a List Box so I can select multiple salespeople at the same time. So this is what I have right now...
  19. B

    Need help in writing VB code to loop through a List Box and create separate PDFs

    The criteria that changes each report is based on the field RM_FULL_NAME. I didn't use VB code for the original report -- used Access macros based on form input. SELECT ParseText([pipeline]![Short Description],0) AS ARL, pipeline.Status, pipeline.[Estimated Close Date], pipeline.[Probability...
  20. B

    Need help in writing VB code to loop through a List Box and create separate PDFs

    The report I am running is based on this query: SELECT ParseText([pipeline]![Short Description],0) AS ARL, pipeline.Status, pipeline.[Estimated Close Date], pipeline.[Probability of Close], ParseText([pipeline]![Short Description],1) AS [BRANCH RM], ParseText([pipeline]![Short Description],2)...
Top Bottom