1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

VB Express 2010 - Parameter Error

Discussion in 'Software Development' started by witakr, Jun 4, 2012.

Thread Status:
Not open for further replies.
Advertisement
  1. witakr

    witakr Thread Starter

    Joined:
    Dec 9, 2006
    Messages:
    121
    Hello good people.

    I am trying to create a form which will be used to access an Access database to store data. In the code below I am trying to add a new record.

    I think I have entered what I have so far correctly but I get this error pictured in the attachment.

    Code:
        Private Sub btnPrintSaveANIR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrintSaveANIR.Click
            'Save Impound Record to the ImpoundExistingRecords Table in PatcherDB1
            Me.ImpoundRecordsTableAdapter.Insert(Me.dtDateANIR.Text, Me.tbTimeANIR.Text, Me.tbOfficerANIR.Text, Me.cbDispatcherANIR.Text, _
                                                 Me.tbHookNoANIR.Text, Me.tbVehYearANIR.Text, Me.tbVehStyleANIR.Text, Me.tbVehColorANIR.Text, _
                                                 Me.cbVehMakeANIR.Text, Me.cbKeysANIR.Text, Me.tbLicensePlateANIR.Text, Me.tbLPStateANIR.Text, _
                                                 Me.tbLPYearANIR.Text, Me.tbVINANIR.Text, Me.tbOwnerNameANIR.Text, Me.tbOwnerAddressANIR.Text, _
                                                 Me.tbOwnerCityANIR.Text, Me.tbOwnerStateANIR.Text, Me.tbOwnerZipANIR.Text, Me.tbOwnerCountryANIR, _
                                                 Me.tbOperatorNameANIR.Text, Me.tbOperatorAddressANIR.Text, Me.tbOperatorCityANIR.Text, Me.tbOperatorStateANIR.Text, _
                                                 Me.tbOperatorZipANIR.Text, Me.tbOperatorCountryANIR.Text, Me.tbTowRequestByANIR.Text, Me.tbTowedFromANIR.Text, _
                                                 Me.tbTowedToANIR.Text, Me.cbImpoundedQuestionANIR.Text, Me.cbWreckerServiceANIR.Text, Me.tbWreckerDriverANIR.Text, _
                                                 Me.cbWreckerServiceANIR.Text, Me.tbReasonImpANIR.Text, Me.tbmlAddlInfoRemarksANIR.Text)

    I hope I have given enough info.

    Thanks in advance for helping.

    Jay
     

    Attached Files:

  2. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,732
    Does the number of parameters you are passing match the number of columns in the table?

    Rollin
     
  3. witakr

    witakr Thread Starter

    Joined:
    Dec 9, 2006
    Messages:
    121
    No it does not because there are some columns that are not used on this particular form. The columns which are not used in this form are meant to be blank until the data is entered in to them at a later time using another form.
     
  4. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    5,949
    don't you need to pass the same number of parameters? Pass blanks when no data is available?
     
  5. witakr

    witakr Thread Starter

    Joined:
    Dec 9, 2006
    Messages:
    121
    I suppose I could pass "0" or null values or something as a place holder but what is important here is that I be able to enter data into most of the columns from one form at one time and then at a later time find that record and enter new data in the remaining columns and save all data in the record all from a separate form.
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1055768