User Profile

Collapse

Profile Sidebar

Collapse
moishy101
moishy101
Last Activity: Jan 12 '14, 08:06 AM
Joined: Feb 5 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Sub Demo()
    Dim i As Integer
    Dim arrOne() As String, arrTwo() As String

    arrOne = Split("Apple,Or ange,Grape,Lemo n", ",")
    arrTwo = Split("Green,Or ange,Red,Yellow ", ",")

    'assuming that each source has the same number of names
    ReDim arrDestination( 0 To 1, 0 To UBound(arrOne))

    For i = 0 To UBound(arrDesti nation, 2)
    ...
    See more | Go to post

    Leave a comment:


  • moishy101
    started a topic Merge two 1d arrays into one 2d array

    Merge two 1d arrays into one 2d array

    How can I merge two one dimensional arrays into one two dimensional array?

    for example:
    arrOne = Split("Apple,Or ange,Grape,Lemo n", ",")
    arrTwo = Split("Green,Or ange,Red,Yellow ", ",")

    arrThree should return:
    ("Apple", "Green")
    ("Orange", "Orange")
    ("Grape", "Red")
    ("Lemon", &q...
    See more | Go to post

  • moishy101
    started a topic Help with simple Cross Tab query

    Help with simple Cross Tab query

    Hello all experts,

    I'm struggling with a simple cross tab query and would appreciate your help.

    I'm trying to create a cross tab query, to list employes and their salaries and bonuses that they got per month.

    Here is the table setup:
    tblEmployes includes the following fields:
    ID
    Surname
    GivenName
    Address
    HomePhone
    CellPhone
    Email

    t...
    See more | Go to post

  • moishy101
    replied to Combobox to filter a y/n field
    twinnyfo

    Thanks for your time, I think I got it sorted for now.
    See more | Go to post

    Leave a comment:


  • moishy101
    replied to Combobox to filter a y/n field
    Take a look at the help files on the OpenReport method....
    See more | Go to post

    Leave a comment:


  • moishy101
    replied to Combobox to filter a y/n field
    On second thought maybe the problem is with the rest of the sub.
    Code:
        Dim strWhere As String
        strWhere = " A.City Like '" & Nz([Forms]![frmReports]![cboCity], "*") & "'" _
                   & " And" & _
                   " A.Neighborhood Like '" & Nz([Forms]![frmReports]![cboNeighborhood], "*") & "'"
    Would the use...
    See more | Go to post

    Leave a comment:


  • moishy101
    replied to Combobox to filter a y/n field
    I tried this but it doesn't seem to filter properly.
    Code:
        If Not IsNull(cboForSale) Then
            strWhere = strWhere & " And" & " A.ForSale Like " & IIf([Forms]![frmReports]![cboForSale] = "For Sale", True, False)
        End If
    See more | Go to post

    Leave a comment:


  • moishy101
    replied to Combobox to filter a y/n field
    If the combo box is empty not to apply that filter (there are other filters).
    See more | Go to post

    Leave a comment:


  • moishy101
    replied to Combobox to filter a y/n field
    @twinnyfo

    It's very simple to change the record source of a report (Me.RecordSourc e = strSQL, in the on open event).

    But as I mentioned that is not how I want it done.
    See more | Go to post

    Leave a comment:


  • moishy101
    replied to Combobox to filter a y/n field
    I don't want to change the record source of the report, I'm trying to filter using the where clause of DoCmd.OpenRepor t.
    See more | Go to post

    Leave a comment:


  • moishy101
    started a topic Combobox to filter a y/n field

    Combobox to filter a y/n field

    What is the proper syntax to a use a combo box to filter results of a report based on a y/n field and apply no filter if the combo box is empty?

    this is what I have so far:
    Code:
    strWhere = " YesNoField Like " & IIf([Forms]![frmReports]![cboYesNo] = "Yes", True, False)
    But it won't account for an empty combo box.
    See more | Go to post

  • moishy101
    replied to DoCmd.OpenReport trouble
    Ok I think I got it, I had added another filter using the AND keyword Should have been & " AND " &.
    See more | Go to post

    Leave a comment:


  • moishy101
    replied to DoCmd.OpenReport trouble
    I tried your suggestion
    Code:
    strWhere = " A.City Like '" & Nz([Forms]![frmReports]![cboCity], "*") & "'"
    , it ended in a type mismatch error.

    Giving Los Angeles instead of 'Los Angeles'.
    See more | Go to post

    Leave a comment:


  • moishy101
    replied to DoCmd.OpenReport trouble
    How would I do that?
    See more | Go to post

    Leave a comment:


  • moishy101
    replied to DoCmd.OpenReport trouble
    @Rabbit
    Would this do the job?
    Code:
    "City = '[Forms]![frmReports]![cboCity]'"
    @dsatino
    What is the proper syntax?
    See more | Go to post

    Leave a comment:


  • moishy101
    started a topic DoCmd.OpenReport trouble

    DoCmd.OpenReport trouble

    I'm trying to open a report using the following code:
    Code:
    Private Sub cmdPrintSample_Click()
        Dim strWhere As String
        strWhere = Nz([Forms]![frmReports]![cboCity], "'" & "*" & "'") & _
                   " AND " _
                   & Nz([Forms]![frmReports]![cboNeighborhood], "'" & "*" & "'") & _
    ...
    See more | Go to post

  • moishy101
    replied to Last 3 records by group
    Thank you all for your help, I'm busy with several other projects right now, I hope to get back to this issue in a week or so.
    See more | Go to post

    Leave a comment:


  • moishy101
    replied to Last 3 records by group
    NeoPa:


    [MonthOrder] is in a separate table so the sql will have to be adapted a little bit.

    Unfortunately it is not possible to use a HAVING clause in a query which has no GROUP BY clause and no aggregation functions, and so I get a "HAVING clause (RowNumber([ClientID])<4) without grouping or aggregation." error.



    The order is fine, the problem is that it shows all records instead...
    See more | Go to post

    Leave a comment:


  • moishy101
    replied to Last 3 records by group
    Is it was possible to have a separate auto-numbered field for each ClientID, if so would grabbing the last three records for each ClientID (based upon the auto-numbered field) be any more effective?

    If the answer the above in yes, how can I implement it?
    See more | Go to post

    Leave a comment:


  • moishy101
    replied to Last 3 records by group
    Rabbit:

    What table setup do I need for your new query to work?
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...