Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Type Mismatch" error?

Status
Not open for further replies.

OverDrive

IS-IT--Management
Dec 11, 2000
268
US
Here is my code... I am getting a type mismatch error on this line... "Resume Exit_cmdAdd_Click" Which is the last line?

Any Ideas?
Thanks
Chance~~




Private Sub cmdAdd_Click()
'-----------------------------------------------------------------------------------------------------------------
' Used to add new user to the tblSecurity table
' Created by: Richard Rensel or Quantum Data Solutions
' Date Created: 19 Jan 2001
' Date Modified: 22 Dec 2001
'----------------------------------------------------------------------------------------------------------------
On Error GoTo Err_cmdAdd_Click

Dim dbs As DAO.Database
Dim rst As DAO.Recordset

Set dbs = currentdb
Set rst = dbs.OpenRecordset("tblSecurity", dbOpenDynaset)

With rst
.AddNew
![Password] = Me.txtPassword
![UserID] = Me.txtUserID
![Active] = Me.chkActive
![AccessID] = Me.cboAccessID
![ViewID] = Me.cboViewID
.Update
End With

If ("fmnuUsers") Then
Forms!fmnuUsers.Requery
Forms!fmnuUsers.lstUsers.Requery
End If

MsgBox "New user has been successfully added to the database.", vbInformation + vbOKOnly, "User Update"

Exit_cmdAdd_Click:
Exit Sub

Err_cmdAdd_Click:
MsgBox Err.Description
Resume Exit_cmdAdd_Click


End Sub
 
Seems like I answered one like this earlier. Watch the text boxes with numbers in them. If you know a variable to be a number then put a val() around it telling the compiler it is a number. You can also use the MSGBOX and a vartype() or typevar(). I never get tht right the first time.

rollie@bwsys.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top