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)
...
User Profile
Collapse
Profile Sidebar
Collapse
moishy101
Last Activity: Jan 12 '14, 08:06 AM
Joined: Feb 5 '12
Location:
-
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... -
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... -
twinnyfo
Thanks for your time, I think I got it sorted for now.Leave a comment:
-
-
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], "*") & "'"
Leave a comment:
-
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
Leave a comment:
-
If the combo box is empty not to apply that filter (there are other filters).Leave a comment:
-
@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.Leave a comment:
-
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.Leave a comment:
-
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)
-
Ok I think I got it, I had added another filter using the AND keyword Should have been & " AND " &.Leave a comment:
-
I tried your suggestionCode:strWhere = " A.City Like '" & Nz([Forms]![frmReports]![cboCity], "*") & "'"
Giving Los Angeles instead of 'Los Angeles'.Leave a comment:
-
-
@Rabbit
Would this do the job?Code:"City = '[Forms]![frmReports]![cboCity]'"
What is the proper syntax?Leave a comment:
-
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], "'" & "*" & "'") & _
-
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.Leave a comment:
-
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...Leave a comment:
-
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?Leave a comment:
-
Rabbit:
What table setup do I need for your new query to work?Leave a comment:
No activity results to display
Show More
Leave a comment: