command botton

wendy

New member
Local time
Today, 23:25
Joined
Jan 17, 2002
Messages
6
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
 

Users who are viewing this thread

Back
Top Bottom