Too Few Parameters, 1 expected - 67389

I'm getting the error too few paremeters, 1 expected with the code below.
I'm getting the error at "
    Set rst3 = dbs.OpenRecordset(strSQL3)".  Any help would be much
appreciated




On Error GoTo Err_cmdCreateRecords_Click

Dim intResp As Integer
Dim intCount As Integer

If ReportDate = "" Or IsNull(ReportDate) Then
    MsgBox "Please enter a valid report date."
    ReportDate.SetFocus
    GoTo Exit_cmdCreateRecords_Click
End If


intResp = MsgBox("This function will add records for the reporting date
specified.  Do you wish to continue?", vbOKCancel, "Confirm Create Monthly
Records")

If intResp = 1 Then

    Screen.MousePointer = 11
    
    Dim dbs As Database
    Dim strSQL As String
    Dim strSQL2 As String
    Dim strSQL3 As String
    
    Dim rst As Recordset
    Dim rst2 As Recordset
    Dim rst3 As Recordset
    
    
    
    
    
    
    
    
    
    
    
    
    
    Set dbs = CurrentDb
    strSQL = "Select * from CheckinList "
    strSQL2 = "Select * from [Customer Info] where [statusid] <> 2"
    strSQL3 = "Select * from [Checkin query]where [reportingdate]= #" & Forms!
[CheckIn Date Form]!ReportDate & "#"
    Set rst = dbs.OpenRecordset(strSQL)
    Set rst2 = dbs.OpenRecordset(strSQL2)
    Set rst3 = dbs.OpenRecordset(strSQL3)
    intCount = 0

    rst2.MoveFirst
    
    Do Until rst2.EOF = True
    
      rst.FindFirst "[CustomerID] = " & rst2![CustomerID]
      rst2![CustomerID] = " & rst3![customerid]"
        
       
        If rst.NoMatch Then
            
            rst.AddNew
            
            rst!ReportingDate = Forms![CheckIn Date Form]!ReportDate
            rst!CustomerID = rst2!CustomerID
               
                If rst2!LBR = "N/A" Then
                  rst!LBRRecd = "n/a"
                End If
               
                If rst2![A/R] = "N/A" Then
                  rst!ARAgingRecd = "n/a"
                End If
                
                If rst2![A/P] = "N/A" Then
                  rst!APAgingRecd = "n/a"
                End If
                
                If rst2!InvCert = "N/A" Then
                  rst!InventoryRecd = "n/a"
                End If
                
                
                 If rst2!BalSheet = "N/A" Then
                  rst!BalanceRecd = "n/a"
                End If
                
                If rst2!IncomeStmt = "N/A" Then
                  rst!IncomeRecd = "n/a"
                End If
                
                
                     'Test to see if Quarterly Reports are Due this period


If rst2![A/R1] = "Quarterly" And rst3!rst3![QtrDate1] <> rst3![QtrDueDate1]
And rst3![QtrDate1] <> rst3![QtrDueDate2] _
        And rst3![QtrDate1] <> rst3![QtrDueDate3] And rst3![QtrDate1] <> rst3!
[QtrDueDate4] Then
       rst2!ARAgingRecd1 = "n/a"
End If
        
If rst2![A/R1] = "Quarterly" And rst3![QtrDate1] <> rst3![QtrDueDate1] And
rst3![QtrDate1] <> rst3![QtrDueDate2] _
        And rst3![QtrDate1] <> rst3![QtrDueDate3] And rst3![QtrDate1] <> rst3!
[QtrDueDate4] Then
       rst2!APAgingRecd1 = "n/a"
End If
        
If rst2![InvCert1] = "Quarterly" And rst3![QtrDate1] <> rst3![QtrDueDate1]
And rst3![QtrDate1] <> rst3![QtrDueDate2] _
        And rst3![QtrDate1] <> rst3![QtrDueDate3] And rst3![QtrDate1] <> rst3!
[QtrDueDate4] Then
       rst2!InventoryRecd1 = "n/a"
End If

If [LBR1] = "Quarterly" And rst3![QtrDate1] <> rst3![QtrDueDate1] And rst3!
[QtrDate1] <> rst3![QtrDueDate2] _
        And rst3![QtrDate1] <> rst3![QtrDueDate3] And rst3![QtrDate1] <> rst3!
[QtrDueDate4] Then
        rst2!LBRRecd1 = "n/a"
End If


        
If [INC1] = "Quarterly" And rst3![QtrDate1] <> rst3![QtrDueDate1] And rst3!
[QtrDate1] <> rst3![QtrDueDate2] _
        And rst3![QtrDate1] <> rst3![QtrDueDate3] And rst3![QtrDate1] <> rst3!
[QtrDueDate4] Then
       rst2!IncomeRecd1 = "n/a"
End If
If [BAL1] = "Quarterly" And rst3![QtrDate1] <> rst3![QtrDueDate1] And rst3!
[QtrDate1] <> rst3![QtrDueDate2] _
        And rst3![QtrDate1] <> rst3![QtrDueDate3] And rst3![QtrDate1] <> rst3!
[QtrDueDate4] Then
        rst2!BalanceRecd1 = "n/a"
End If
       
       
       



'Test to see if Quarterly Financals are Due this Period


If rst2![INC1] = "Quarterly" And rst3![FinDate1] <> rst3![FinDueDate1] And
rst3![FinDate1] <> rst3![FinDueDate2] _
        And rst3![FinDate1] <> rst3![FinDueDate3] And rst3![FinDate1] <> rst3!
[FinDueDate4] Then
       rst2!IncomeRecd1 = "n/a"
        End If
              
If rst2![BAL1] = "Quarterly" And rst3![FinDate1] <> rst3![FinDueDate1] And
rst3![FinDate1] <> rst3![FinDueDate2] _
        And rst3![FinDate1] <> rst3![FinDueDate3] And rst3![FinDate1] <> rst3!
[FinDueDate4] Then
        rst2!BalanceRecd1 = "n/a"
        End If
       
                
                
                
                
                
                
            rst.Update
            rst2.MoveNext
            intCount = intCount + 1
     
        Else
            rst2.MoveNext
        End If
    Loop
   
   
        If intCount > 0 Then
        
         'Run modules to code the Checkinlist table status fields
          [CheckInStatus].ReceivedRepts1
          [CheckInStatus].MissingRepts1
          [CheckInStatus].StatusTest1
          
         End If
   
    Screen.MousePointer = 0
    
    MsgBox "Processing is Complete." & vbCrLf & vbCrLf & _
    intCount & " Records have been created.", vbOKOnly, _
    "Create Monthly Records Processing."
  
   
End If


  
'Move focus to OK button
    cmdOK.SetFocus

Exit_cmdCreateRecords_Click:
    Exit Sub

Err_cmdCreateRecords_Click:

    Screen.MousePointer = 0
    MsgBox Err.Description
    Resume Exit_cmdCreateRecords_Click

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200709/1

0
dhoover
9/19/2007 1:11:55 PM
access.formscoding 7494 articles. 0 followers. Follow

2 Replies
874 Views

Similar Articles

[PageSpeed] 27

I made both changes and still receive the same error.  

Andy Hull wrote:
>Hi
>
>Firstly, on the strSQL3 = line, check your code has a space between [Checkin 
>query] and where.  Your post shows them as running together like...
>
>strSQL3 = "Select * from [Checkin query]where
>
>Should be...
>
>strSQL3 = "Select * from [Checkin query] where
>
>Also, try formatting the date as follows...
>
>strSQL3 = "Select * from [Checkin query] where [reportingdate]= #" & 
>format(Forms![CheckIn Date Form]!ReportDate, "mm\/dd\/yyyy") & "#"
>
>Watch out for the line wrap - it's all one line.
>
>hth
>
>Andy Hull

-- 
Message posted via http://www.accessmonster.com

0
dhoover
9/19/2007 2:47:21 PM
Hi

Looks like the issue could be with the query named [Checkin query].

Does it have a parameter? Can you post the SQL?

Regards

Andy Hull


"dhoover via AccessMonster.com" wrote:

> I made both changes and still receive the same error.  
> 
> Andy Hull wrote:
> >Hi
> >
> >Firstly, on the strSQL3 = line, check your code has a space between [Checkin 
> >query] and where.  Your post shows them as running together like...
> >
> >strSQL3 = "Select * from [Checkin query]where
> >
> >Should be...
> >
> >strSQL3 = "Select * from [Checkin query] where
> >
> >Also, try formatting the date as follows...
> >
> >strSQL3 = "Select * from [Checkin query] where [reportingdate]= #" & 
> >format(Forms![CheckIn Date Form]!ReportDate, "mm\/dd\/yyyy") & "#"
> >
> >Watch out for the line wrap - it's all one line.
> >
> >hth
> >
> >Andy Hull
> 
> -- 
> Message posted via http://www.accessmonster.com
> 
> 
0
Utf
9/20/2007 8:12:27 AM
Reply:

Similar Artilces:

Crm 4 event log warnings. CRM Parameter Filter
Hi all, I am looking for a solution on the following issue. Any suggestions will be very welcomed! Thank you in advance. Background: We just upgraded MS Crm 3 to Crm 4 Question: Every time when a user tries to save an update of a record. A warning will be logged into Event Viewer --> Application. It happens to all entities. For example: 1. I am doing some updates on the contact form http://localhost:5555/CAMELOT-DEV/sfa/conts/edit.aspx?id={488FF696-4F8C-DE11-AC94-00505698306E}# 2. Click save 3. I will find a warning message in Event Viewer --> Application Exception information: ...

Qty x cost from 1 colume
I have a workbook that has a list of part numbers & Qtys. It looks up the cost from 3 different Mfg product line lists and returns the cost in 3 different columes. Now I need to multiply the Qty. x the cost but I only want it done for 1 colume. Some of the pn's are in 1,2, or 3 of the columes. I use IF(ISNA) to put 0's in when it's not on one of the lists. Some Pn's are used in 1 or more lines & some are not. So far I've not come up with a good formula. Thanks in advance for any ideas. PN qty cost1 cost2 cost3 total cost 111 2 1.00 0 ...

1-variable Data Table dependent on MS Query fails to update correctly
{cross-posting from excel.programming because I think this is relevant (maybe even moreso) here too.} I have an Excel (2000) financial model whose bottom line values are dependent on results pulled from a simple MS Query (3 of them, actually, and together they take about 10 seconds +/- to run). I'm trying to run a simple data table to see how those values vary by changing a single assumption (that's what data tables are for). In my data table, I have a single assumption (Fed Funds Rate) that should affect the results of the query. This assumption itself is not a parameter in the que...

Really need help
I need to create a job/sales tracking sheet. 4 employees how do I set it up to track : Job #, Date, Customer, Price, Employee, Reg Hrs., Ot Hrs. I have the basics figured out, but need some help to be able to tune up info to seperate info for individual employees. I have attached a copy of what i have so far Mike ...

Inserting More Than 1 Chart Title
Can anyone tell me if it is possible to insert more than 1 chart title, and if so how. Les. To add more text to a chart, select the chart, and type the text. As you type, you'll see the text in the formula bar. When you press the Enter key, a textbox will appear in the chart. You can drag this to a new location in the chart, and format it with the buttons on the formatting toolbar. Les wrote: > Can anyone tell me if it is possible to insert more than > 1 chart title, and if so how. > Les. -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech...

Count if between date parameters
I need create a formula that show how many patients were available to be seen on each day of the month. I would like to make the cut-off for changes of dates as 3pm, meaning that one day is from 3pm - 3pm the next day. e.g. - 12/30/09 available patients would be all those there from 3:01pm on 12/29/09 to 3:00pm on 12/30/09. If they're available for the full day count them only. Using this logic with the data below on 12/30/09 only 2 patients were available to be seen. Name Request DT Res DT P1 12/27/2009 1:26 12/31/2009 16:28 P2 12/27/2009 12:00 12/30/2009 7:20 P3 ...

[Ann} Open XML Converter Update 1.0.3
For those having a problem applying this update when obtained via AutoUpdate... Download the update from the Mactopia site instead. This worked for me: <http://www.microsoft.com/mac/downloads.mspx?pid=Mactopia_AddTools&fid=9D6D9 EAA-8442-4184-8886-FAAB2803BDE6#viewer> HTH |:>) Bob Jones [MVP] Office:Mac ...

What WDK to use for WDF 1.7 ?
We need to distribute a driver with WDF 1.7. It has to work on all OSes (XP, Vista, Win7). What WDK should we install to get the right coinstallers? WDK 6001.18001, which contains coinstallers 6001.18000, comes with the following readme (here truncated): "WDK ... 6001.18000 ... DO NOT DISTRIBUTE" I believe we need WDK 6001.18002, which appears to be the latest WDF 1.7. Where can we get this? I don't see it on my MSDN subscriber downloads. Thanks, / Hannes. why not kmdf v1.9 (Which is what is on w7 anyways). since you have to have xp which has no inbo...

reuse unusable urls in a column ith 1 command
Hi all, Here is another freak question from one of my students: "I receive a column with URL's where some are clickable and others aren't. (blue or black) When I get into a cell with an unclickable url and press F2 and next Enter the URL becomes clickable again. Taking me to the clicked website. When I have a column of 5 problematic URL's this is OK but when I have thousands of rows I get tired. Is there a way to in one command activate all unclickable URL's?" My idea is that we ould need a macro to go to all rows and edit and confirm. I could write the macro ...

Query Parameter
I want to supply a parameter to a query to define the from date and to date and retrieve data falling under this from and to date. but, i do not want it to be prompted, as the same criteria is to be used in more than one table. so, i want to store the from date and o date in a temp table and related this to the date field in different tables. thanks You could create a table (tblDateRange) with 2 date fields (datStart and datEnd) and only one record. Then add tblDateRange to your query and don't join it. Set the criteria under your date field to: Between [datStart] and [datEnd] ...

optional method parameter in MFC ActiveX
How do you set a method parameter as optional in an MFC ActiveX control? Kurt "Kurt" <k_nojunk@larimore.net> wrote in message news:%23HK$bCR4DHA.2468@TK2MSFTNGP09.phx.gbl... > How do you set a method parameter as optional in an MFC ActiveX control? > > Kurt Depends, (1) do you mean when you create an activex control yourself, and you wish to make a parameter optional? Or (2) do you want to pass an optional argument to a method of the ActiveX control? Solution (1) : Make it a variant parameter. If the variant is of type VT_ERROR and the value is DISP_E_PARAMNOTFOU...

User Locked out on only 1 DC
Has anyone seen a user account that was only locked out on 1 DC ? Replication will kick in and transmit out to others over time. If same site it should be neat same though. Tips on tracking down: Is the account logged into more than one machine or is it running a service on the same machine? A user could have mapped drives to a resource from one machine, on a different machine he changes his password and then the first machine attempts to stay mapped to a drive and the password is no longer correct and eventually locks the user out. Or after a password is changed a service is run...

Field Code For Heading 1
What is the field code for Heading 1? Thanks Word does not use Field Codes to invoke Headings. It uses Styles. For information about how to set up heading numbering, see the following page of fellow MVP Shauna Kelly's website: "How to create numbered headings or outline numbering in your Microsoft Word document" at: http://www.ShaunaKelly.com/word/numbering/OutlineNumbering.html If you create a template to hold your numbering scheme, you can use that template as the basis for new documents (using File > New) and the new documents will then inherit y...

Question from MOS file E03C-1-1 , Creating data and contents
Hi, Am currently studying MOS 2003 - Excel Core Exam. Am practicing file E03C-1- from the practice folder where its giving the following instructions... Open the EditContent workbook, and on sheet1, select the contents of D7 for editing . Delete the period to the left of the 8, and insert a period between 8 and 5. Complete the correct corrected entry. Display Sheet2, and select A1:D3. Clear all the contents, formats and comments from the range. Display sheet3, select A1:D134, and clear only its formats. Q1) When it says "select the contents of D7 for editing . Delete the period t...

CRM 1.1 and SBS 2003 Compatability
Hi, I just received Small Business Server 2003 and I am eager to install it, but I need to know if it supports CRM 1.1 or if there any patches that will make it work. Also, does the CRM Sales for Outlook work with Office 2003? Thanks, Hi: I assume you mean CRM 1.2, since there was no 1.1 release, and yes, CRM 1.2 is fully supported on SBS 2003 Premium Edition. John. "Nick" <anonymous@discussions.microsoft.com> wrote in message news:013b01c3b047$474a3cc0$a101280a@phx.gbl... > Hi, > > I just received Small Business Server 2003 and I am eager > to install it, ...

Groove 2007 problems after upgrade from 3.1.
I've just gone through the very painful process of upgrading to Groove 2007 from version 3.1. A whole day lost trying to make it work again when it was fine before. But it is still not working correctly. Only some of my contacts are showing as online. I've gone through the "delete the contact"/"send a message"/"add the contact" process as suggested in the knowledgebase but no success. I can even send messages to the ones who appear offline, but when they reply I do not receive them. Amy ideas? Tony. There is a specific group for gro...

Too few parameters?
Hello All I have SELECT statement that I have built using the SQL view of a query. The SELECT statement contains WHERE, GROUP BY, HAVING and ORDER BY parameters. All has been working fine, until today when I have needed to add an extra criteria to the HAVING part: This worked: "HAVING ((([x confirmed].name)=" & Chr(34) & [Forms]![staffs subform new]![employee] & Chr(34) & "))" but this does not: "HAVING ((([x confirmed].entered) =" & Chr(34) & [forms]![staffs subform new]![child813]![entered] & Chr(34) & ")...

(Suggestion) Flag emails for "Response Expected" on creation
One of the common things I see is issues falling into "black holes" because X emailed Y, Y forgot to respond, and it did not go any further. It would be good if X could tick a box that was "Response Expected" or similar while creating email (or in a sent item), and have a filtered view that let you quickly review what email items you were expecting a response from and toggle off quickly where no longer relevant. In essence it might be a special type of category As additional optional related field - "Expect Response by" [date] --------------...

After KB915597 Definition 1.75.377.0, Outlook 2003 Doesn't Work
We downloaded Windows Defender KB915597 Definition 1.75.377.0 today. Ever since, Outlook 2003 malfunctions. The first problem was that we could neither send nor receive email, so we attempted to repair Office 2003. Now, not only can we still not receive, but we cannot search our Outlook folders! Do we need to uninstall that update, or is something else wrong? Microsoft has established separate newsgroups for Windows Defender support and comments. This is not one of them. See http://www.microsoft.com/athome/security/spyware/software/newsgroups/default.mspx Outlook-specific n...

Over 500 PSTs on 1 PC
I have a user who's been migrated to a new machine. Her old one was a Dell GX270 with about 256MB RAM and XP SP2 and Outlook 2003. The new HP has the same software, but has 2GB RAM and is a new dual-core job. The user has 563 PSTs. I wish I were exagerrating. She literally has some of these with 1 email in them. She has all of them "opened" in outlook (By that I mean she has them loaded, but not all are expanded). And... surprise, surprise, she's getting a lot of corruption in the PSTs, giving her problems opening emails and personal folders constantly. Here's the ki...

MSN Parameters
I have a free e-mail account at msn.com. I had to install a new hard drive and reinstall my software. What are the parameters to access my e-mail at msn? POP3, HTTP, etc. If POP3 what are the parameters for outgoing and incoming e-mail? Thanks. JustAsking JustAsking wrote: And you are using WHICH version of Outlook? > I have a free e-mail account at msn.com. That doesn't make clear whether you have a classic MSN Hotmail account or a new Windows Live Hotmail account. You sure you didn't get converted to a Windows Live Hotmail account? For HOW LONG have you had the ...

Printing a Report with Parameters
When printing a report with Parameters. The report will come up on the screen after you enter the parameter. When you then print the report it asks for the parameter again. After we click finish, the following error appears on the screen 'Information is needed before this report can be processed (On Cache Page/Server EIACRM.pgsvr) The report will not print. what server os is your crm web running and also what is your domain controller(s) running? also its possible you have embedded the servername in the report. open the report in crystal designer and go to database-verify dat...

Taking multiple parameters
I am running a query inside my macro that creates a worksheet full of some info. I want users to be able to take the results of one macro, and use it as arguments for another macro. So lets say I run 1 macro, I get 2 user ids as a result, say: 1, 2 Now I want to use these user ids as input parameters. Keep in mind these input parameters might vary. So how do I supply these as parameters to another macro? Pass the calculated or retreived values as parameters to the second macro: Sub Macro1() IDValue1 = "ID 123" IDValue2 = "ID 456" Macro2 IDValue1, IDValue2 End Sub Sub M...

Parameters in waveinproc
Hello. The documentation for WaveInProc, the callback function for waveform audio, defines 5 parameters, including an instance and a handle. Using that definition works in debug but crashes in release mode. Digging around in the assembler reveals that in fact this function (and its sister function for output) needs only two parameters (It does a RET 8 - hence two parameters). The second param usefully points to the relevant wavehdr structure. Fixing this to two parameters produces code that no longer crashes in Release mode. But this all seems very strange - why on earth does the documen...

CRM Sales for Outlook 1.2 connection problem.
I successfully installed CRM Sales for Outlook 1.2 on my laptop with Office 2003. I can connect to the database and see the contact and lead names in the Outlook browser window but when I try to open up a record, I receive an error stating "An error has occurred. For more information, contact your system administrator." The Event Viewer has the following application error MSCRM Application Error Report ------------------------------------------------------------------------------------------------------- Error Message: An unhandled exception occurred during the execution of the cu...