filtering split form-URGENT Help need

igourine

Registered User.
Local time
Yesterday, 22:28
Joined
Nov 8, 2010
Messages
39
Hi,
this is 2nd time i am posting in the forum & i hope my problem will be solved, i attached database & would like to filter the data by ISO N & Joint N.
the first filter is working but there is small problen in filter joint N.
please see the VBA to refer to the problem:banghead:.

thanks in advance
 

Attachments

So what is exactly your problem? You are joining successfully on SpoolN and JointN, I can only find an ISO N in your tab_data, but cant find anything in VBA refering to ISO N?

FYI: expecting help within 45 minutes, is more like a service you would pay for... not like some online free forum
 
namlin, be aware of igourine has posted the same question in 3 places.
 
namlin, be aware of igourine has posted the same question in 3 places.
Dear JHB,
i already delete the duplicate from General forum the same time you inform me this is FYI.
 
So what is exactly your problem? You are joining successfully on SpoolN and JointN, I can only find an ISO N in your tab_data, but cant find anything in VBA refering to ISO N?

FYI: expecting help within 45 minutes, is more like a service you would pay for... not like some online free forum


Dear Namliam,
thanks for replay the issue was that i can filter with spool N but the code did not allow me to filter with joint N & that was my issue (see red highlighted).
not that ISO N was only mistake from me.

Private Sub cmdJointN_AfterUpdate()

Dim geog As Integer, fnd As Boolean
Dim rsMVF As DAO.Recordset
If Me.RecordsetClone.RecordCount > 0 Then

Me.RecordsetClone.MoveFirst
geog = Me.cmdJointN.Column(0)

Do While Not Me.RecordsetClone.EOF


Set rsMVF = Me.RecordsetClone("JointN").Value
fnd = False
rsMVF.MoveFirst
Do While Not rsMVF.EOF
If geog = rsMVF![Value].Value Then
fnd = True
End If
rsMVF.MoveNext
Loop
rsMVF.Close

Me.RecordsetClone.Edit
If fnd <> True Then
Me.RecordsetClone("Active") = False
End If
Me.RecordsetClone.Update
Me.RecordsetClone.MoveNext
Loop

If IsNull(Me.Filter) Or Me.Filter = "" Then
Me.Filter = "Active = True"
Else
Me.Filter = Me.Filter & " AND Active = True"
End If
Me.FilterOn = True

End If

End Sub
 
Dim rsMVF As DAO.Recordset
...
Set rsMVF = Me.RecordsetClone("JointN").Value

How would you fill a recordset with a Value? Seems obvious this will fail?
 
Dim rsMVF As DAO.Recordset
...
Set rsMVF = Me.RecordsetClone("JointN").Value

How would you fill a recordset with a Value? Seems obvious this will fail?


Dear Namliam,
i was thinking the same think however i try to fill the record set with Qry & tab but same problem did not work?:banghead:
 
however you what?

The proper way to copy your recordset is something like:
Set rsMVF = Me.RecordsetClone

If you then want to find a particular value/record/record with a value
rsMVF.FindFirst
rsMVF.FindNext
rsMVF.FindLast

Are options you can consider, it will be much faster than your dowhile loop

Furthermore you realize you can "fiddle" with the WHERE clause of your form, and work with an "actual proper" filter on your form to say
Where this = that and Something = There or That = Him and Her = Beautifull

That will be much faster to filter your recordset than to loop your records and tag them, then filter them.
 

Users who are viewing this thread

Back
Top Bottom