No go
It doesn't pass on the filter, so all records are shown.
Although you can select the fields
I tryed this one before an besides the above result. One main point why this wouldn't be the best solution (if it worked, o.k. maybe ;) ) and that is that a specified path and file naam has to be...
Thanks Jibbadiah
Forms![<Enter the name of your form here>]![Surname]
This should produce the same results as what you see on your form... am I correct?
Correct. Although I have to edit the value manually when I open the query, and it doesn't (yet) update automatically from the form.
So then...
KenHigg, Thanx for your time
From the top (because I agree, this shouldn't be this difficult)
1. You have a form with Me![surname] on it.
Correct
2. You have pre-built a simple select query that uses Me![surname] as a criteria.
Correct: This is where the form gets it data from
3. The user...
So far I have something like this added in the sub after apply filter:
DoCmd.OpenQuery (Query_name, [View As AcView = acViewNormal], [DataMode As AcOpenDataMode = acEdit])
DoCmd.ApplyFilter ([name])
However this isn't valid vb syntax (even though it is directly from the vb window :rolleyes: )
Yeah the form allows the user to select the value in this case surname,
then by filtering it it only shows those records with the same surname.
It works great!
I think adding an updat query command to the vb I just opsted would do the trick.
Something like:
Pass/apply Me.Filter = "[name] =...
Private Sub surname_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[name] = '" & Me![surname] & "'"
Me.Bookmark = rs.Bookmark
' Filter the recordset
Me.Filter = "[name] = '" &...
So if I could somehow pass the filter to the query it would work then. :)
O.k. how do I do that generically.
So something like : just pass on filter to that query.
Process then being on.click button by user
macro or vb
gotoquery
apply current filter to query
output to
Sounds simple...
Hej Jibbadiah, thanx for the reply
The only problem I run into when I run a query export is that access loses the applied filter.
I thought of running some kind of update query in the macro (yes my vb is atrocious)
But whenever I run anything of a query through the system it loses the...
First off I apoligise if this is a clear answer. I have looked on the internet for the last two days and can't seem to find this anywhere, either that or I am just entereing the search parameters in wrong :confused:
I have filtered selection in a form which I want to export to excel.
Simple...