473,491 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Error: "No value given for one or more required parameters

I keep getting the error "No value given for one or more required
parameters", but not sure why. Can anyone please look at my code snipet
and see if you see any reason why I could be getting this error. I am
just trying to update a record using MS Access 2003 as the front end.
This code is in VB.NET

Private Sub cmdUpdate_Click()
On Error GoTo Err_cmdUpdate_Click

Dim rstUsers As New ADODB.Recordset
Dim fld As ADODB.Field
Dim strField As String
Dim strSQL As String
strSQL = "select dbo_tbl_Users.* from dbo_tbl_Users " & "where
dbo_tbl_Users!EmpRec=" & "'" & Me.cboEmpRec & "'"
rstUsers.Open strSQL, CurrentProject.Connection, adOpenKeyset,
adLockOptimistic
If Not IsNull(Me.cboEmpRec.value) Then
rstUsers!EmpRec = Me.cboEmpRec.value
End If

If Not IsNull(Me.txtEmpID) Then
rstUsers!EmpID = Me.txtEmpID
Else
MsgBox "Please enter an employee number", vbOKOnly
GoTo Exit_cmdUpdate_Click
End If
If Not IsNull(Me.txtEmpName) Then
rstUsers!EmpName = Me.txtEmpName
Else
MsgBox "Please enter an employee name", vbOKOnly
GoTo Exit_cmdUpdate_Click
End If

If Not IsNull(Me.cboStatus.value) Then
rstUsers!Status = Me.cboStatus.value
Else
MsgBox "Please enter a status for the employee", vbOKOnly
GoTo Exit_cmdUpdate_Click
End If

If Not IsNull(Me.txtUName) Then
rstUsers!UserName = Me.txtUName
Else
MsgBox "Please enter a user name for the employee", vbOKOnly
GoTo Exit_cmdUpdate_Click
End If

If Not IsNull(Me.txtPass) Then
rstUsers!Password = Me.txtPass
Else
MsgBox "Please enter a password for the employee", vbOKOnly
GoTo Exit_cmdUpdate_Click
End If

rstUsers.Update
rstUsers.Close

MsgBox "Employee Record has been updated successfully.", vbOKOnly
DoCmd.Close
cboEmpRec = Null
txtEmpID = Null
txtEmpName = Null
txtPass = Null
cboStatus = Null
txtUName = Null
Set rstUsers = Nothing
Exit_cmdUpdate_Click:
Exit Sub

Err_cmdUpdate_Click:
MsgBox Err.Description
Resume Exit_cmdUpdate_Click

End Sub

*** Sent via Developersdex http://www.developersdex.com ***
Aug 23 '07 #1
0 2404

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5711
by: David C. allen | last post by:
I have created a simple Client-side SOAP Extension for a webclass that I have. When I apply the extension attribute to the the calling function in the proxy class I get an error 'Value cannot be...
2
2419
by: Ricardo Magalhães | last post by:
Hi, I using this code, to connect with a paradox file with ASP.NET. The first time its connect ok, but others times occurs the error: "ERROR - no error information available" I close all...
2
2174
by: XML newbie: Urgent pls help! | last post by:
Hi, I am getting the error: Value of type 'String' cannot be converted to '1-dimensional array of Long'. in the following line for TextBox2.Text field : ...
5
7194
by: Martin Jørgensen | last post by:
Hello again, Sorry to bother but I guess my C++ book isn't very good since it obviously contains errors so the program code doesn't work with g++. However I don't understand what the problem...
2
4498
by: Chris | last post by:
Hi, I want to show the whole recordset. There are 42 records and 2 fields. .... comd = New System.Data.OleDb.OleDbCommand("select name,lok from pc", oConnection) dtreader = comd.ExecuteReader...
2
2689
by: Praveen Chandra | last post by:
Hi, I am trying to build a static library, while building the library i am getting the following error: fatal error C1189: #error : "No sstream/strstream implementation" Following is the...
3
5836
by: uday.sen | last post by:
Hi, I am porting a piece of code from VC++ to linux platform. My compiler is g++ 3.2.2. I am getting following error: no matching function for call to A::setResponse(std::wstring) candidates...
0
1983
by: nurmaiza | last post by:
Hello, i'm using windows, eclipse, Tomcat 5.5 and JSP file trying to connect jdbc ms sql using jdts driver. i've download the driver and assigned the path at en.variable..but it give me an error no...
8
36415
by: rssd | last post by:
can somebody help me. I'm trying to read some excel files but i'm always getting this error No type library matching "Microsoft Excel" found at D:\Genes_datasets\exp.pl line 4 Win32::OLE(0.16):...
0
6978
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7154
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7190
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6858
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4881
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4578
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3086
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1392
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
280
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.