I had to reformat my laptop and... (1 Viewer)

ChazRab

New member
Local time
Today, 05:23
Joined
Oct 6, 2009
Messages
26
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
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
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)
Code:
Go.Visible = False
Nextbtn.Visible = False
Fldname.Visible = False
SearchVal.Visible = False
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
 

boblarson

Smeghead
Local time
Today, 03:23
Joined
Jan 12, 2001
Messages
32,059
That's Office 2007 not Office 7. And did you remember to set a Trusted Location again?
 

Users who are viewing this thread

Top Bottom