UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Filtering In Continious Subform    
 
   
dummy2
post Apr 6 2012, 09:01 AM
Post #1

UtterAccess Member
Posts: 37



Hi All

Something is going wrong . I have a mainform where i build in some filter options (one with set option group , and one build on a combo box)

Now the combobox filter give me a problem, it does not filter to the records with customerID = cmdcustomer (combobox)

Private Sub cmdcustomer_AfterUpdate()

Dim intNumOfDetails As Integer
Dim strMsg As String

'Will the Filter (Order ID/Section) actually produce any Records?)
intNumOfDetails = DCount("*", "frmEntwicklungsanfrageUbersicht", "[CustomerID] = " & Me![cmdcustomer])

If Not IsNull(Me![cmdcustomer]) Then 'must be an entry
If intNumOfDetails > 0 Then 'Filter produces Records
Me![frmEntwicklungsanfrageUbersicht].Form.Filter = "[CustomerID] = " & Me![cmdcustomer]
Me![frmEntwicklungsanfrageUbersicht].Form.FilterOn = True
Else
strMsg = "Keine EntwicklugsAnfragen fur customerID [Me![cmdcustomer]]"
MsgBox strMsg, vbExclamation, "Keine Entwicklungs Anfragen"
End If
End If


End Sub


Someone a clue

Dummy

This post has been edited by dummy2: Apr 6 2012, 09:02 AM
Go to the top of the page
 
+
arnelgp
post Apr 6 2012, 09:09 AM
Post #2

UtterAccess Ruler
Posts: 1,090



will this work:

Private Sub cmdcustomer_AfterUpdate()

Dim intNumOfDetails As Integer
Dim strMsg As String

'Will the Filter (Order ID/Section) actually produce any Records?)
intNumOfDetails = DCount("*", "frmEntwicklungsanfrageUbersicht", "[CustomerID] = " & Me!cmdcustomer.Column(0))

If Not IsNull(Me![cmdcustomer]) Then 'must be an entry
If intNumOfDetails > 0 Then 'Filter produces Records
intNumOfDetails = DCount("*", "frmEntwicklungsanfrageUbersicht", "[CustomerID] = " & Me!cmdcustomer.Column(0))

If Not IsNull(Me![cmdcustomer]) Then 'must be an entry
If intNumOfDetails > 0 Then 'Filter produces Records
Me![frmEntwicklungsanfrageUbersicht].Form.Filter = "[CustomerID] = " & Me!cmdcustomer.Column(0)

Me![frmEntwicklungsanfrageUbersicht].Form.FilterOn = True
Else
strMsg = "Keine EntwicklugsAnfragen fur customerID [Me![cmdcustomer]]"
MsgBox strMsg, vbExclamation, "Keine Entwicklungs Anfragen"
End If
End If


End Sub
Go to the top of the page
 
+
dummy2
post Apr 6 2012, 09:16 AM
Post #3

UtterAccess Member
Posts: 37



Hi Arnelgp

No did not work eather.


Dummy

Go to the top of the page
 
+
dummy2
post Apr 6 2012, 09:45 AM
Post #4

UtterAccess Member
Posts: 37





Hi all

Maybe it has to do that the main form is a unbound form with the subform. The mainform is like a switchboard.

mainform = frmEntwicklung


Greats

Dummy
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 21st May 2013 - 02:15 AM