I have a form that pulls a lot of info from different tables together in a single record. There is no unique ID field I could set to match like in a typical filter. ie "CustomerID = " & CustomerID
What I would like is to filter out all but the current record, then I'm going to use a DoCmd.RunSavedImportExport "MyExport" to save the record to a pdf for distribution.
Does anyone know how to do this?? The following doesn't work.
Dim sFilter As String
Dim lngCurrRec as long
lngCurrRec= Me.CurrentRecord
sFilter = "[Me.CurrentRecord]= '" & lngCurrRec & "'"
'assign the filter value,and turn filtering on
Me.Filter = sFilter
Me.FilterOn = True
DoCmd.RunSavedImportExport "MyExport"
Me.FilterOn = False