I did save my Access Database3.accdb and all of its forms. When I reinstalled MS Office 7, the following code did not work properly or at all.
This code
does not perform the desired actions in the code lines. For example, these two fields(Fldname and Searchval) and the two buttons(Go and Nextbtn)
appear when the form is opened(loads) and according to the code, they shouldn't.
Is something not right with the settings in the newly reinstalled Access Office 7 or possibly something else?
Thanks for anyone's help on this. It has me stumped.
CR
email: car1946@gmail.com
This code
Code:
Private Sub Form_load()
Go.Visible = False
Nextbtn.Visible = False
Fldname.Visible = False
SearchVal.Visible = False
End Sub
Private Sub Go_Click()
Fldname.SetFocus
If Fldname.Text = "First Name" Then
DoCmd.GoToControl ("First Name")
Else
If Fldname.Text = "Last Name" Then
DoCmd.GoToControl ("Last Name")
Else
If Fldname.Text = "Company" Then
DoCmd.GoToControl ("Company")
Else
End If
End If
End If
DoCmd.FindRecord SearchVal, acAnywhere, False, acSearchAll, , acCurrent, True
If SearchVal <> "" Then
Else
MsgBox "Match Not Found For: " & SearchVal, ""
SearchVal.SetFocus
End If
'Go.Visible = False
'Nextbtn.Visible = False
'Fldname.Visible = False
'SearchVal.Visible = False
End Sub
Code:
Go.Visible = False
Nextbtn.Visible = False
Fldname.Visible = False
SearchVal.Visible = False
Is something not right with the settings in the newly reinstalled Access Office 7 or possibly something else?
Thanks for anyone's help on this. It has me stumped.
CR
email: car1946@gmail.com