Hi, Hope you are all ok. I've made a form that sends out an email to named members about an issue they have to look at. The email contains a link to a database which opens a specific record, this is ok. The issue I've noticed is if you shut the form down , when you reopen it it still links to the same record so the rest of the database is filtered out to this record only. Even if I open a form to search for records it still only links to the linked record. if the database is shut down and reopened the search forms are clear. I just cant seem to clear the filter from a close button. i have tried in the close button
the code that generates the link is
and this is the code that interprets the in coming command sent from the link
if anyone has any ideas how to clear the resident filter that would be appreciated
thanks
ian
Code:
Me.Refresh
Me.Requery
Me.Filter = ""
Me.FilterOn = false ' and tried true
the code that generates the link is
Code:
FEpath = "\\server.home.com\home\cqa ecc\RPS\Rpsdb\"
AccessPath = "C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.EXE"
ClientDirectory = "\\server.home.com\home\cqa ecc\Rps\RPSdb\RPS.accdb"
FormID = "RPS, RPSno=" & strDevNo
' Create a shortcut object on the desktop
Set MyShortcut = WSHShell.CreateShortcut(FEpath & "\" & "RPS " & FormID & ".lnk")
and this is the code that interprets the in coming command sent from the link
Code:
Private Sub Form_Open(Cancel As Integer)
If Len(Command) > 0 Then
' something was passed from link to open relevant form and required record
MsgBox ("command greater")
Dim logit As String
logit = Command()
MsgBox logit
Dim varParms As Variant
varParms = Split(Command, ",")
MsgBox UBound(varParms)
If UBound(varParms) = 1 Then
DoCmd.OpenForm varParms(0), acNormal, , varParms(1)
End If
Else
'' nothing was passed open entry form to search
MsgBox ("command less")
DoCmd.OpenForm "frmEnter"
End If
End Sub
if anyone has any ideas how to clear the resident filter that would be appreciated
thanks
ian