Create table from Filtered records on a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all

I know I can have a filtered query create a new table but can I do it from
records filtered on the current form which are selected by a user? The user
chooses a Year (YearFilter) and a Quarter period (toggle button values 1 - 4)
which filters data and I want to create a new table of this set of records.

Thanks in advance for any help.
Sue
 
Sue, here is an example of how to use the current forms filter. You
would need to change the sql to a createtable, then probably an append
or insert, but it shows how to use the current forms filter as part of
a query.


Dim theFilter As String

DoCmd.SetWarnings False

If Me.FilterOn = True Then
theFilter = " AND " & Me.Filter
Else
theFilter = ""
End If


DoCmd.RunSQL "UPDATE qryAddressBids_Assign_Sub2ndTry SET
qryAddressBids_Assign_Sub2ndTry.Assign = true " & _
"WHERE
(((qryAddressBids_Assign_Sub2ndTry.Assign)=False))" & theFilter & ";"
 
Back
Top