Tech Support Forum banner
Status
Not open for further replies.
1 - 8 of 8 Posts

·
Registered
Joined
·
183 Posts
Discussion Starter · #1 ·
Error 1 Argument not specified for parameter 'AppointedTime' of 'Public Overridable Overloads Function Insert(CustomerID As Integer?, LoanOfficerID As Integer?, _Date As Date?, AppointedTime As String) As Integer'. can any 1 explain what is the issue with this an me having a text box to enter time??

i am making a form to add a new record in here;s my code



Form1.APPOINTMENTTableAdapter.Insert(Me.TextBox1.Text, Me.TextBox2.Text, Me.TextBox3.Text)
Form1.APPOINTMENTTableAdapter.Fill(Form1.A_AAADataSet.APPOINTMENT)
MsgBox("Record ADDED successfully!!!")
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""

an access 2007 database to link with vb2008 but i getting this error?
 

·
TSF-Emeritus
Joined
·
2,057 Posts
Re: whats this error

Hello mad19.

It seems your missing parameters for 'AppointedTime'. Check which parameters this takes and compare them with the ones you already have. If you have trouble still after finding and putting in any missing parameters that you haven't specified, please say so and we'll go further.
 

·
Registered
Joined
·
183 Posts
Discussion Starter · #3 ·
Re: whats this error

welll thats the problem i dont no how to set the parameter for it i was using a help video where to add a new record he open a new page put on the text boxes he needed to enter data use the format above an it worked i even tried it on another page to enter a new customer record an it worked but for the appointment record it says the "appointment time"parameter which i dont understand what is that i have to put ?
 

·
TSF-Emeritus
Joined
·
2,057 Posts
Re: whats this error

We'll that's where I'm at a loss. I can't find any information on the 'AppointedTime' call your using. If I've never used it, and cannot find the info on how it should be called ( parameters and all ) I'm not much help lol. I'll see if someone else is able to help you with this issue.
 

·
Registered
Joined
·
1,930 Posts
Re: whats this error

Hi

I could totally be missing the ball here but:
This is the function:
Code:
Public Overridable Overloads Function [B]Insert[/B](CustomerID As Integer?, LoanOfficerID As Integer?, _Date As Date?, AppointedTime As String) As Integer
which requires 4 variables: CustomerID, LoanOfficerID, _Date, AppointedTime

Then when you call Function Insert
Code:
Form1.APPOINTMENTTableAdapter.Insert(Me.TextBox1.Text, Me.TextBox2.Text, Me.TextBox3.Text)
You only have 3 variables: TextBox1.Text, TextBox2.Text, TextBox3.Text

Therefore aren't you missing the 4th variable AppointedTime?
 

·
TSF-Emeritus
Joined
·
2,057 Posts
Re: whats this error

Albert may be right, the error could be simply saying your missing the parameter 'AppointedTime' instead of a call named 'AppointedTime'. Try checking what he is saying ( possibly just put 'NULL' as the forth parameter just to see if the compiler gets happy with that being your last parameter, and if so that's the issue ). If you however do know what should be in 'AppointedTime', you could just put that inside instead.

Nice call Albert!
 

·
Registered
Joined
·
183 Posts
Discussion Starter · #7 ·
Re: whats this error

sorry i took long to get back my net is down an i did over my database on access made sure every ting was ok dere an tried it back an put the missing textboxes as well an it worked
 
1 - 8 of 8 Posts
Status
Not open for further replies.
Top