Neil_in_Japan
Registered User.
- Local time
- Today, 00:58
- Joined
- Nov 20, 2014
- Messages
- 12
On a report, I have a txtField that is receiving data from a lookup:
txtHRTech =[HR Tech].[Column](1)
Column 0 is the ID No.
Column 1 is the First Name Last Name
Column 2 is the Email Address
This field is part of a 'group' and all the HRTech data is group together. Works great!
I want to be able to run a filter, via a button, on that report to only display the HRTech's name.
Button will be, for me:
Private sub Neil_Click()
Me.Filter = "[txtHRTech]= Neil"
Me.FilterOn = True
End Sub
I have also tried:
Private sub Neil_Click()
dim tmpHRTech = variant
tmpHRTech = "Neil"
DoCmd.ApplyFilter , "[txtHRTech] = tmpHRTech"
End Sub
I have also tried a macro with the same criteria.
Each time I am prompted with a dialog box asking for the txtHRTech's entry. Even if I type the correct name, the filter is ignored.
Any ideas?
Thanks in advance!
txtHRTech =[HR Tech].[Column](1)
Column 0 is the ID No.
Column 1 is the First Name Last Name
Column 2 is the Email Address
This field is part of a 'group' and all the HRTech data is group together. Works great!
I want to be able to run a filter, via a button, on that report to only display the HRTech's name.
Button will be, for me:
Private sub Neil_Click()
Me.Filter = "[txtHRTech]= Neil"
Me.FilterOn = True
End Sub
I have also tried:
Private sub Neil_Click()
dim tmpHRTech = variant
tmpHRTech = "Neil"
DoCmd.ApplyFilter , "[txtHRTech] = tmpHRTech"
End Sub
I have also tried a macro with the same criteria.
Each time I am prompted with a dialog box asking for the txtHRTech's entry. Even if I type the correct name, the filter is ignored.
Any ideas?
Thanks in advance!