prabha_friend
Prabhakaran Karuppaih
- Local time
- Today, 10:41
- Joined
- Mar 22, 2009
- Messages
- 987
ECS Total:
Why am I getting "Too few parameters. Expected 1." Here?
Even the Physical Query "ECS Total" is not getting the run-time updated textbox's value. How to make the value entered in the textbox on runtime? and How to make the query read the value?
Code:
SELECT Count(ECS.[Supply / Source]) AS [CountOfSupply / Source], Sum(Abs([Base Currency Amount])) AS ABS
FROM ECS LEFT JOIN [LOB Mapping] ON ECS.[Source Field Value] = [LOB Mapping].SRC_FLD_VALUE
WHERE (((ECS.[Effective Date])=[Forms]![Launch Pad]![txtCOB]));
Code:
'ECS
Set wbInputBook = Workbooks.Open(Me.txtECS.Value, ReadOnly:=True)
With wbInputBook
.Sheets("Summary").Delete 'Unwanted Sheet (Hardcoded)
With .Sheets(1)
COBDate = .Range("B5").Value
[I][B]Me.txtCOB.Value = COBDate
[/B][/I] If Nz(DCount("*", "List of COBs"), 0) > 0 Then
MsgBox "COB(" & COBDate & ") Already Processed. Hence Quitting"
Exit Sub
End If
.Rows("1:22").Delete 'Headers
For Each Header In .UsedRange.Rows(1).Cells
Header.Value = Replace(Header.Value, Chr(10), "")
Next Header
End With
.SaveAs CurrentProject.Path & "\Temp.xlsx", xlWorkbookDefault
DoCmd.TransferSpreadsheet acImport, , "ECS", CurrentProject.Path & "\Temp.xlsx", True
Me.Requery
[B][I] Set rsTemp = CurrentDb.OpenRecordset("ECS Total")[/I][/B]
End With
wbInputBook.Close
Why am I getting "Too few parameters. Expected 1." Here?
Even the Physical Query "ECS Total" is not getting the run-time updated textbox's value. How to make the value entered in the textbox on runtime? and How to make the query read the value?