theinviter
Registered User.
- Local time
- Yesterday, 21:51
- Joined
- Aug 14, 2014
- Messages
- 268
Dear guys,
Need help,
Code Tags Added by UG
Please use Code Tags when posting VBA Code
Please read this for further information:-
Please feel free to Remove this Comment
;
;;
;;;
I draw your attention to my other posts in this thread where I point out that this is not the first time that you have been asked to use code tags
See Here:- https://www.access-programmers.co.uk/forums/threads/copy-record-from-from-to-a-table.314089/
And Here:-
;;;
;;;
;;
;;
;
;
;;;
;
;;;
;;;
;
;;
xxxXx
xxx
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
xx
xx
x
xx
x
x
x
x
x
xx
x
x
xx
x
x
xx
x
x
x
xx
x
x
x
xx
x
x
x
xx
x
x
x
xx
x
x
x
xx
x
x
x
x
xx
x
x
x
x
xx
x
x
x
x
x
x
x
x
x
;;;
;;
;;;
;;;
;;
;;
;
;
;;;
;
;;;
;;;
;
;;
;;;
;;
;;;
;;;
;;
;;
;
;
;;;
;
;;;
;;;
;
;;
;;;
;;
;;;
;;;
;;
;;
;
;
;;;
;
;;;
;;;
;
;;
;;;
;;
;;;
;;;
;;
;;
;
;
;;;
;
;;;
;;;
;
;;
;;;
;;
;;;
;;;
;;
;;
;
;
;;;
;
;;;
;;;
want to filter a subform with call criteria.
Subform name " MRN_Query1_subform "
i tried this code but no result , what change have to do to make it work in subform.
thanks
Need help,
Code Tags Added by UG
Please use Code Tags when posting VBA Code
Please read this for further information:-
Please use Code Tags when posting VBA Code
To make your code easier to read, please use the Code tag around your code, this will ensure that any code you copy and paste from your DB retains it's formatting making it easier to read and follow; Firstly click on the Code button, that's the button at the top of the posting window with the...
www.access-programmers.co.uk
;
;;
;;;
I draw your attention to my other posts in this thread where I point out that this is not the first time that you have been asked to use code tags
See Here:- https://www.access-programmers.co.uk/forums/threads/copy-record-from-from-to-a-table.314089/
And Here:-
Filter subform with call criteria
Dear guys, Need help, Code Tags Added by UG Please use Code Tags when posting VBA Code Please read this for further information:- https://www.access-programmers.co.uk/forums/threads/please-use-code-tags-when-posting-vba-code.240420/ Please feel free to Remove this Comment ; ;; ;;; I draw...
www.access-programmers.co.uk
;;;
;;;
;;
;;
;
;
;;;
;
;;;
;;;
;
;;
xxxXx
xxx
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
xx
xx
x
xx
x
x
x
x
x
xx
x
x
xx
x
x
xx
x
x
x
xx
x
x
x
xx
x
x
x
xx
x
x
x
xx
x
x
x
xx
x
x
x
x
xx
x
x
x
x
xx
x
x
x
x
x
x
x
x
x
;;;
;;
;;;
;;;
;;
;;
;
;
;;;
;
;;;
;;;
;
;;
;;;
;;
;;;
;;;
;;
;;
;
;
;;;
;
;;;
;;;
;
;;
;;;
;;
;;;
;;;
;;
;;
;
;
;;;
;
;;;
;;;
;
;;
;;;
;;
;;;
;;;
;;
;;
;
;
;;;
;
;;;
;;;
;
;;
;;;
;;
;;;
;;;
;;
;;
;
;
;;;
;
;;;
;;;
want to filter a subform with call criteria.
Subform name " MRN_Query1_subform "
i tried this code but no result , what change have to do to make it work in subform.
Code:
Private Sub filterThisForm7()
On Error GoTo errhandler:
n = 1 / 0 ' cause an error
Dim strFilter As String
If Len(Me!Combo59 & "") <> 0 Then
strFilter = "[Item] Like ""*" & Me!Combo59 & "*"" And "
End If
If Len(Me!Combo1 & "") <> 0 Then
strFilter = strFilter & "[Me.MRN_Query1_subform.Account_Name ] Like ""*" & Me!Combo1 & "*"" And "
End If
If Len(strFilter) <> 0 Then
strFilter = Left$(strFilter, Len(strFilter) - 5)
With Me
.Filter = strFilter
.FilterOn = True
End With
Else
Me.FilterOn = False
End If
Exit Sub
errhandler:
' error handling code
Resume Next
End Sub
thanks
Last edited by a moderator: