you. guys. rock.
It is working very well. That last issue joe addressed was spot on.
I do believe we have victory, guys.
Thank you sooooo very much for all of your assistance.
OK, it works when it runs alone, but when I combine both ShipDest and PN as a filter criteria set, I get a type mismatch error 13....i.e.:
PN: 301154 = returns fine or
ShipDest: DTK3A = returns fine
PN: 301154 and ShipDes: DTK3A returns "type mismatch error 13"
What did I miss or do wrong?
If IsNumeric(Me(Nam)) And CStr(Val(Me(Nam))) = Me(Nam) And Me(Nam).Tag <> "ShipDest" And "PN" Then
gives a run time error.
this line was highlighted in the debug.
I am obviously not getting it.
lameid,
I am sorry, but I am not sure I have this figured out. The line you posted is the one that we changed earlier on to deal with the ShipDest issue. DO I add an OR and then outline "PN" to be affected as well?
If IsNumeric(Me(Nam)) And CStr(Val(Me(Nam))) = Me(Nam) And Me(Nam).Tag...
Ok gentlemen, one last issue. It seems you have been able to rectify all of my issues....now to the final problem I have created with this:
In the PN field, when I enter a pure number (much like I had before in the ShipDest issue), I get a data type mismatch error. i.e. 301154 causes this...
joeflorendo -
this is probably a huge newbie mistake - but I am seeing a major issue with this whole thing - it is linked directly to a table. When I type in lookup values and apply filters, it is working - however, when i go to type in the next value set, it changes the table! NOT GOOD!
I...
the clear filter works on the report (I can watch it change in the background), but the form still has values left in the cbo boxes. That is something I can deal with - I would prefer these also were de-populated when this is clicked, but no great tragedy if they are not.
I believe that the PN...
joeflorendo
right on the money. that stopped the dialogue form popping up - however, it is still not filtering to expectation.
i also have tested every cmd button on the form, and the clear filter button does not work as well. What can I do to help you help me (besides quit using Access =) )...
The SQL statement:
Design the report
Get the form properties (right click the little black box where the rulers meet in the uper left of the report)
On the all tab, the very first item is the recordsource.
I am assuming this is a query. Design that query.
Switch to SQL view by using the drop...
Current code:
Option Compare Database
Private Sub cmdApplyFilter_Click()
Dim Cri As String, x As Integer, Nam As String
Dim strDelimeter As String
For x = 1 To 4
Nam = "Filter" & x
If Trim(Me(Nam) & "") <> "" Then
If IsNumeric(Me(Nam)) And CStr(Val(Me(Nam)))...
yes, thank you, I understand and and or functions. As stated earlier, I grabbed this directly from Microsoft...as i am a very new VBA user. However, it is always good to re-visit the basics in this manner, it allows that the foundation is correct and we are the same page.
What I am shy on...
Ok, we seem to have made progress.....when I filter using date and ship dest, works great. When I use PartNumb, FAIL! When I attempt to filter by PartNumb, it still does not show all of the records I know are there. This field also has the ability to have both numeric, alpha or a combination...
sorry for the misnomer - filtering it is.
Private Sub cmdApplyFilter_Click()
Dim Cri As String, x As Integer, Nam As String
Dim strDelimeter As String
For x = 1 To 5
Nam = "Filter" & x
If Trim(Me(Nam) & "") <> "" Then
If IsNumeric(Me(Nam)) And Val(Me(Nam)) =...
Also:
When I type in a pure number into ShipDest, i get a "type mismtach" error....i.e. 03116 which is a ship code for a customer. My ship codes are as follows:
17419, AP04A, P025A, SSPO-1, etc. Varied numeric and aplha charcters in each, or all numeric, or in some cases, all aplha character.
I have updated the code as lameid pointed out. That and removing the ? in the tag has opened a new doors - however =)
Now the is working, but not as it should. When I sort by, say, ShipDest, it doesn't show the destination I know is there (i.e. P025A), or only a few of many (i.e. DTK3A), or...
joeflando - the ShipDest can have any combination of alpha and numeric characters in it. i.e. AP04A or SSPO-1, etc. etc. Where would I put quotes around that value in the code?
Click the button, hit ctrl+G and at the bottom copy the text in the bottom pane (immediate window) and post it here"
PartNumb='100408K' AND ShipDest=08068 AND ShipDate=#8/3/2009# AND Printed?=-1 AND Supervisor='J. Skeen'
I have removed the "Printed?" and made it "Printed". Still getting this...
syntax error (missing operator) in query expression '(PartNumb = '100408K' AND ShipDest = 08068 AND ShipDate = #8/3/2009# AND Printed? = -1 AND Supervisor = 'J.Skeen')'.
The ' is moving around =)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.