Hi,
I have an unusual problem. My office has a paper form on which certain fields must be filled. This form only exists in paper format; there is no electronic version. It was recommended to me that the best way to fill out this form is to create an Excel spreadsheet that contains the answers...
Yes, that works. But I still can't get the where clause to be passed when the Where clause AuthorizationID is in a set of values returned from a query.
I have:
DoCmd.OpenReport "Expense Report", acViewPreview, , strWhere
strWhere = "[A.AuthorizationId] in (" & reportSQL & ")"
reportSQL =...
They are both data type 'Short Text'
This is a pretty simple command so I don't understand what I am doing wrong. When I hard-code the value passed from the form (from Debug.Print) directly in the report query, it works. The Open Report command is opening the report, but not passing the Where...
Something must be wrong with the report. Even when I try to pass a single variable, the where clause of the report does not change and all records are returned:
DoCmd.OpenReport "Expense Report", acViewPreview, , "[A.AuthorizationId] = " & Me.VoucherID
Fisrt Query that populates form:
SELECT * FROM qryUserAuth WHERE 1 = 1 AND [traveler last name] Like "*Bojko*"
Second query to get the id number of people displayed on form:
Select AuthID from (SELECT * FROM qryUserAuth WHERE 1 = 1 AND [traveler last name] Like "*Bojko*" )
The where clause...
Yes, the code compiles.
The value of strSQL is
*~*~*~*~*~*~*~*~*
Yes, the code compiles.
The value of strSQL is
*~*~*~*~*~*~*~*~*
SELECT * FROM qryUserAuth WHERE 1 = 1 AND [traveler last name] Like "*Bojko*"
~*~*~*~*~*~*~~*
The Filter box is empty
I am now getting the message that...
Ok, but now the where clause is not being passed to the report.
Here is my code:
/********************************************************************
Public Sub cmdReport_Click()
reportSQL = "Select AuthorizationID from (" & strSQL & ")"
MsgBox reportSQL
strWhere =...
I use a query that selects handful of people (from thousands) based on search criteria entered by the user. I then want the report to use the ten or so IDs displayed on the form to show expense data for these people from another table.
Hi,
I have an expense report based on a complex query. The report is called from a form that displays a list of people. How do I call the report and pass to it all of the people shown in the form. I am passing a person id so the report will show the expenses related to that person -- but I...
Initially, I was trying to use CDate. I first used it in the select part of the query that was the recordsource for the form. When I later used that variable to test the date range, nothing would happen.
The only way I for the code to work was when I re-imported this very huge table and set the...
When I tried to convert it, I got such a message. I started from the beginning, re-imported the table, this time setting the field type, and now it works, using the same code as before. It never worked when I was trying to convert the date at any other point.
Thanks for your help.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.