There's no such thing as a stupid question, but they're the easiest to answer.


Software Development Software Development
Search Search
Search for:
Tech Support Guy > > >

VB Express 2010 - Parameter Error


witakr's Avatar
witakr witakr is offline
Computer Specs
Member with 121 posts.
Join Date: Dec 2006
Experience: Beginner
04-Jun-2012, 11:03 AM #1
VB Express 2010 - Parameter Error
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.

    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.

Attached Thumbnails
VB Express 2010 - Parameter Error-vb2010error1.jpg  
Rollin_Again's Avatar
Member with 4,700 posts.
Join Date: Sep 2003
Location: Atlanta, GA - Planet Earth
Experience: Advanced
04-Jun-2012, 07:30 PM #2
Does the number of parameters you are passing match the number of columns in the table?

witakr's Avatar
witakr witakr is offline
Computer Specs
Member with 121 posts.
Join Date: Dec 2006
Experience: Beginner
05-Jun-2012, 02:12 AM #3
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.

Last edited by witakr; 05-Jun-2012 at 03:23 AM..
Keebellah's Avatar
Keebellah   (Hans) Keebellah is offline Keebellah is a Trusted Advisor with special permissions. Keebellah has a Profile Picture
Computer Specs
Trusted Advisor with 5,463 posts.
Join Date: Mar 2008
Location: Oegstgeest, The Netherlands
Experience: Advanced
05-Jun-2012, 04:40 PM #4
don't you need to pass the same number of parameters? Pass blanks when no data is available?
witakr's Avatar
witakr witakr is offline
Computer Specs
Member with 121 posts.
Join Date: Dec 2006
Experience: Beginner
05-Jun-2012, 04:51 PM #5
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.

Last edited by witakr; 05-Jun-2012 at 10:28 PM..
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine

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.

Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

You Are Using: Server ID
Trusted Website Back to the Top ↑

Content Relevant URLs by vBSEO 3.3.2