TRY:
WHERE NextCycleStartsDt=CDATE([Forms]![frmMainBilling]![Text46])
It may be that JET is having difficulty with determining the data type of
Text46.
Another way to do this would be to actually add the reference to the textbox
as a parameter.
Parameters [Forms]![frmMainBilling]![Text46] DateTime;
SELECT CustId, CustStatus, CustType, CustName,
RevenueTypeId, RevTypeDesc, [Billing Cycle],
NextCycleStartsDt, BillingAmt
INTO TmpGenMthlyInv_2
FROM qryGenMthlyInv_1
WHERE NextCycleStartsDt=[Forms]![frmMainBilling]![Text46]
--
HTH
Dale
Don''t forget to rate the post if it was helpful!
email address is invalid
Please reply to newsgroup only.
Chuck M said:
Here it is:
SELECT qryGenMthlyInv_1.CustId, qryGenMthlyInv_1.CustStatus,
qryGenMthlyInv_1.CustType, qryGenMthlyInv_1.CustName,
qryGenMthlyInv_1.RevenueTypeId, qryGenMthlyInv_1.RevTypeDesc,
qryGenMthlyInv_1.[Billing Cycle], qryGenMthlyInv_1.NextCycleStartsDt,
qryGenMthlyInv_1.BillingAmt INTO TmpGenMthlyInv_2
FROM qryGenMthlyInv_1
WHERE
(((qryGenMthlyInv_1.NextCycleStartsDt)=[Forms]![frmMainBilling]![Text46]));
--
TIA
Chuck M.
Dale Fye said:
Post the SQL of your query.
--
HTH
Dale
Don''t forget to rate the post if it was helpful!
email address is invalid
Please reply to newsgroup only.
:
Dale - Thanks for the quick response. Changing Form to Forms did the trick.
But now I get a Data Type Mismatch in Criteria Expression. The Format
property of Text46 was blank when I got the error. I changed it to Short
Date. I get the same mismatch error. Any thoughts?
--
TIA
Chuck M.
:
Try:
[Forms]![frmMainBilling]![Text46]
--
HTH
Dale
Don''t forget to rate the post if it was helpful!
email address is invalid
Please reply to newsgroup only.
:
Hi - Could you help with a similar situation that I'm having?
The criteria in my query is [Form]![frmMainBilling]![Text46].
The Control Source of Text46 is ="#" & Format([cboCycleToBill],"mm/dd/yyyy")
& "#" .
cboCycleToBill allows the user to select a month and year ie. September 2009.
On the form, Text46 displays as expected #09/01/2008#
The form is open when the query runs.
The query is prompting me for [Form]![frmMainBilling]![Text46]
What am I doing wrong?
--
TIA
Chuck M.
:
If the form entry object is a textbox bound to a field then you use the name
of the textbox -- not the field name it is bound to.
--
KARL DEWEY
Build a little - Test a little
:
I'm trying to use a form to supply parameters to a query. I've created the
form, which appears to be working just fine. In the 'Criteria' of the query,
I've used the following syntax to open the form:
[Forms]![Name of form]![Field Name]
When I run the query, I get a parameter pop-up box that says:
Forms!Name of form!Field Name
Help! What am I doing wrong?