If I click on "cmd_edit" I would like to receive the information of 1 client of the frmKlantenfiche.
With the following code, he gives me an error in :
DoCmd.OpenForm "frmKlantenfiche", , , strSQL
What do I have to do, or what am I doing wrong?
Private Sub cmdEdit_Click()
Dim Db As CurrentProject
Dim frm As Form_frmKlantenfiche
Dim Code, strSQL As String
Set Db = CurrentProject
Code = InputBox("Wich information would you like to edit?(Code client) ")
If Code = "" Then
DoCmd.OpenForm "frmAlleKlanten"
DoCmd.Close acForm, "frmKlantenfiche"
Exit Sub
End If
strSQL = "Codeklant='" & Code & "'"
DoCmd.OpenForm "frmKlantenfiche", , , strSQL
Forms!frmKlantenfiche!Codeklant.SetFocus
End Sub
Sofie
Tnx
With the following code, he gives me an error in :
DoCmd.OpenForm "frmKlantenfiche", , , strSQL
What do I have to do, or what am I doing wrong?
Private Sub cmdEdit_Click()
Dim Db As CurrentProject
Dim frm As Form_frmKlantenfiche
Dim Code, strSQL As String
Set Db = CurrentProject
Code = InputBox("Wich information would you like to edit?(Code client) ")
If Code = "" Then
DoCmd.OpenForm "frmAlleKlanten"
DoCmd.Close acForm, "frmKlantenfiche"
Exit Sub
End If
strSQL = "Codeklant='" & Code & "'"
DoCmd.OpenForm "frmKlantenfiche", , , strSQL
Forms!frmKlantenfiche!Codeklant.SetFocus
End Sub
Sofie
Tnx