jackie77
Jackie
- Local time
- Today, 22:36
- Joined
- Jul 18, 2007
- Messages
- 85
Hi All
Its been ages since I've been on here so hello to everyone again
Im having some probs getting an update query using vba to work have tried doing loads of things but cant seem to get it to work, Im sure its something small and stupid Im doing! what I have at the minute is below and i get an error too few parameters expected 4
Any help would be great
Cheers
Jackie
Its been ages since I've been on here so hello to everyone again

Im having some probs getting an update query using vba to work have tried doing loads of things but cant seem to get it to work, Im sure its something small and stupid Im doing! what I have at the minute is below and i get an error too few parameters expected 4
Any help would be great

Cheers
Jackie
Code:
Private Sub cmdLogin_Click()
Dim strUpdate As String
Dim db As DAO.Database
Dim Exp1 As String
Dim Exp2 As Boolean
Dim Exp3 As Integer
Exp1 = Me.ExpirationID
Exp2 = Me.Removed
Exp3 = Me.cboEmployee.Value
strUpdate = "UPDATE Expiration Set Removed = Exp2 AND RemovedBy = Exp3 WHERE ExpirtionID = Exp1"
CurrentDb.Execute strUpdate, dbFailOnError
DoCmd.Close acForm, "Login3", acSaveNo