Too Few Parameters....again

  • Thread starter Thread starter BriefTales
  • Start date Start date
B

BriefTales

I know this have been visited. I've read all of the posts but to no avail.
Here's my SQL
_________________________________________________________________
SELECT "CID" & "-" & [tblbriefs].[id] & "-" & Right([tblbriefs].[orderno],6)
AS CID, tblBriefs.OrderNo, tblBriefs.[Business Name], tblBriefs.ShipToFName,
tblBriefs.ShipToLName, tblBriefs.ShipToPrefix, tblBriefs.ShipToStr1,
tblBriefs.ShipToStr2, tblBriefs.ShipToCty, tblBriefs.ShipToSt,
tblBriefs.ShipToZip, Left([shiptozip],5) AS zipfive, tblBriefs.email,
tblBriefs.ShipToCntry, tblBriefs.StampDate, tblBriefs.Phone
FROM tblBriefs
WHERE (([tblBriefs].[StampDate])=[Enter Specific Date]);
___________________________________________________

when I try to save to TXT, "too few parameters. expected 1.

I even tried the transfer text macro suggested by Michael Walsh. It doesn't
work either. Currently, I have to export to Excel, then save the Excel file
to a .txt file in order to use it the way I need to use the data.

Any help is appreciated and thanks in advance. XP, MS Office Professional
2007, ACCESS 2007
 
Did you try remove the parameter prompt and replace it with a hard-coded
date? If that works, try use a reference to a control on a form. If that
doesn't work, I would use a little DAO code to change the SQL of a saved
query and then export based on the saved query.
 
I'll give it a try and thanks for your prompt response...
however, could you further explain "I would use a little DAO code to change
the SQL of a saved query and then export based on the saved query."

Thanks
Dave

Duane Hookom said:
Did you try remove the parameter prompt and replace it with a hard-coded
date? If that works, try use a reference to a control on a form. If that
doesn't work, I would use a little DAO code to change the SQL of a saved
query and then export based on the saved query.
--
Duane Hookom
Microsoft Access MVP


BriefTales said:
I know this have been visited. I've read all of the posts but to no avail.
Here's my SQL
_________________________________________________________________
SELECT "CID" & "-" & [tblbriefs].[id] & "-" & Right([tblbriefs].[orderno],6)
AS CID, tblBriefs.OrderNo, tblBriefs.[Business Name], tblBriefs.ShipToFName,
tblBriefs.ShipToLName, tblBriefs.ShipToPrefix, tblBriefs.ShipToStr1,
tblBriefs.ShipToStr2, tblBriefs.ShipToCty, tblBriefs.ShipToSt,
tblBriefs.ShipToZip, Left([shiptozip],5) AS zipfive, tblBriefs.email,
tblBriefs.ShipToCntry, tblBriefs.StampDate, tblBriefs.Phone
FROM tblBriefs
WHERE (([tblBriefs].[StampDate])=[Enter Specific Date]);
___________________________________________________

when I try to save to TXT, "too few parameters. expected 1.

I even tried the transfer text macro suggested by Michael Walsh. It doesn't
work either. Currently, I have to export to Excel, then save the Excel file
to a .txt file in order to use it the way I need to use the data.

Any help is appreciated and thanks in advance. XP, MS Office Professional
2007, ACCESS 2007
 
Assuming you have a control on your current form to collect the date value.
Also the saved query name is "qselBriefs"
Dim strSQL as String
strSQL = "SELECT 'CID-' & [id] & '-' & Right([orderno],6) AS CID, OrderNo, "
& _
"[Business Name], ShipToFName, ShipToLName, ShipToPrefix, ShipToStr1, " & _
"ShipToStr2, ShipToCty, ShipToSt, ShipToZip, Left([shiptozip],5) AS
zipfive, " & _ "email, ShipToCntry, StampDate, Phone " & _
"FROM tblBriefs " & _
"WHERE [StampDate]=#" & Me.txtDate & "#"
CurrentDb.QueryDefs("qselBriefs").SQL = strSQL
--
Duane Hookom
Microsoft Access MVP


BriefTales said:
I'll give it a try and thanks for your prompt response...
however, could you further explain "I would use a little DAO code to change
the SQL of a saved query and then export based on the saved query."

Thanks
Dave

Duane Hookom said:
Did you try remove the parameter prompt and replace it with a hard-coded
date? If that works, try use a reference to a control on a form. If that
doesn't work, I would use a little DAO code to change the SQL of a saved
query and then export based on the saved query.
--
Duane Hookom
Microsoft Access MVP


BriefTales said:
I know this have been visited. I've read all of the posts but to no avail.
Here's my SQL
_________________________________________________________________
SELECT "CID" & "-" & [tblbriefs].[id] & "-" & Right([tblbriefs].[orderno],6)
AS CID, tblBriefs.OrderNo, tblBriefs.[Business Name], tblBriefs.ShipToFName,
tblBriefs.ShipToLName, tblBriefs.ShipToPrefix, tblBriefs.ShipToStr1,
tblBriefs.ShipToStr2, tblBriefs.ShipToCty, tblBriefs.ShipToSt,
tblBriefs.ShipToZip, Left([shiptozip],5) AS zipfive, tblBriefs.email,
tblBriefs.ShipToCntry, tblBriefs.StampDate, tblBriefs.Phone
FROM tblBriefs
WHERE (([tblBriefs].[StampDate])=[Enter Specific Date]);
___________________________________________________

when I try to save to TXT, "too few parameters. expected 1.

I even tried the transfer text macro suggested by Michael Walsh. It doesn't
work either. Currently, I have to export to Excel, then save the Excel file
to a .txt file in order to use it the way I need to use the data.

Any help is appreciated and thanks in advance. XP, MS Office Professional
2007, ACCESS 2007
 
Back
Top