Expand|Select|Wrap|Line Numbers
- Private Sub BtnSelectPhysician_Click()
- If MsgBox("Assign physician to patient?", vbYesNo + vbQuestion) = vbYes Then
- DoCmd.SetWarnings False
- Dim strSQL As String
- Dim db As DAO.Database
- Set db = CurrentDb
- strSQL = "UPDATE [TblPatientDemographics] " & _
- "SET [RefPhysicianID] = Me.LbxPhysicianSearchResults " & _
- "WHERE ([PtID] = "
- strSQL = strSQL & [Forms]![FrmPatientDemographics].[PtID] & ")"
- Call db.Execute(strSQL)
- DoCmd.SetWarnings True
- End If
- End Sub
I'm getting a "too few parameters, Expected: 1" Error message. I find this odd because when I used
SET [RefPhysicianID] = Null
in my SQL String, it worked fine (updated the field to Null).
Any ideas on what I'm doing wrong?