when I full in my inputbox I came in the right form but not with the trademark I give.Here is the code I used.
thanks to help me
xxx
Dim Db As CurrentProject
Dim frm As Form_frmresulthardware
Dim trademarkhardware, strSQL As String
Set Db = CurrentProject
trademarkhardware = InputBox("Give a trademark")
If trademarkhardware = "" Then
DoCmd.OpenForm "formHard_and_softwareinventarisation"
DoCmd.Close acForm, "frmresulthardware"
Exit Sub
End If
Str SQL = "trademark='" & trademarkhardware & "'"
DoCmd.OpenForm "frmresulthardware", , , strSQL
Forms!frmresulthardware!trademark.SetFocus
thanks to help me
xxx
Dim Db As CurrentProject
Dim frm As Form_frmresulthardware
Dim trademarkhardware, strSQL As String
Set Db = CurrentProject
trademarkhardware = InputBox("Give a trademark")
If trademarkhardware = "" Then
DoCmd.OpenForm "formHard_and_softwareinventarisation"
DoCmd.Close acForm, "frmresulthardware"
Exit Sub
End If
Str SQL = "trademark='" & trademarkhardware & "'"
DoCmd.OpenForm "frmresulthardware", , , strSQL
Forms!frmresulthardware!trademark.SetFocus