Though I'm not the original poster, I posted a related link about inline expression.
.
But what you wrote sounded you did in your first post:-You don't need two queries to do this; you can do it with one query (query with a subquery)
I have read where people complained about Access changing the ( ) brackets to [ ] when a query with an inline expression was saved. ( http://www.access-programmers.co.uk/forums/showthread.php?t=61934&highlight=%5BSelect )
Since both a single query with a subquery (as you offered in your first...
Pat,
Can a report with a subreport, as what you suggested, produce what Ethan wanted, that is, a two-column report showing the money spent on a monthly basis?
Open the crosstab query in Design View. Choose menu Query, Parameters...
In the dialog box that pops up,
type [Forms]![frm_LME]![DateStart] in the Parameter column, and select the correct data type in the Data Type column.
Repeat for the other parameter [Forms]![frm_LME]![DateEnd]
Instead of using a one-query approach, I think you can use a two-query approach.
Save the nested SQL statement as a separate query. Then link to this query in your original query.
If PatientID is a text field, try this:-
SQLStatement:="SELECT * FROM [QryAdenCard] WHERE [PatientID] ='" & [Forms]![FrmNucCard]![Text151] & "';"
If PatientID is a numeric field, try this:-
SQLStatement:="SELECT * FROM [QryAdenCard] WHERE [PatientID] =" & [Forms]![FrmNucCard]![Text151] & ";"
This should also work, though it lacks the flexibility of Jon's function.
SELECT *
FROM [yourTableName]
WHERE format(DateAdd("d",-26,[DateOut]),"yyyymm")=format(DateAdd("d",-26,Date()),"yyyymm");
You need to declare the data type of the parameter in the first query.
Open the first query in Design View. Choose menu Query, Parameters...
Type the combobox reference in the Parameter column i.e.
[Forms]![formName]![comboBoxName]
In the next column, select the correct Data Type.
Do you mean we can put
100 <- - a number, not text.
200 <- - a number, not text.
wrong <- - text.
in one column (that is, in the same field) in the query results?
Thank you very much, Jon K
To verify what you said, I downloaded your database and created a query with this expression:-
Expr1: [Cutting Status] Like [Forms]![frmViewSearch]![Srch_CuttingStatus] Is Null
For the two records that contained Null values in the [Cutting Status] field, Expr1 always...
Jon K-
I have been using Martin Green's method. It works when the field doesn't contain null values.
Why doesn't it work when the field contains null?
Thanks.
Gib