Thanks Andy,
Yes, those IDs are all strings
Whenever I try to insert the code, it turns this section of text red:
YearID, IIF(FullYear = 0, "No", "Yes") As FullYear, Lot, SourceID, Acquired, Quantity,
PLAINTEXT(Description) AS DESCRIPTION, StatusID
FROM tblTool_Log Where 1 + 1 = 2 AND "
Then...
Thanks Andy,
I didn't actually code the FullYear (4 Digits), as it is not a field that I wanted to search by or to sort the column. All I wanted to do was have it display in the filter results. It isn't an important field by itself but rather in conjunction with the information in other...
Thanks Andy,
Unfortunately it didn't work. Without the tblTool_Log. prefix, I get a circular reference error. Placing your IF statement into the original code resolves this error but I still get the numerical values as soon and I use any of the filter functionality.
I have a form based filter that that will show "Yes" or "No" for a checkbox but this changes to "-1" or "0" once any on the combo boxes used to set the filters are used.
On initial loading:
Once the manufacturer is selected (same with any field selected):
The filter was created by MajP for...
Thanks dhookom,
As you can see, I have no idea what I am doing here! I created a standard module and named it as you recommended. I then added the following to the form to call the module:
Private Sub Form_Current()
strAcquired = "[Acquired] = " & SQLDate(Me.[qAcq1]) & " " & andOR...
I tried adding in the code used in the example by Allen Browne but when I compile the data it returns an error saying "Expected End Function"
If Not Trim(Me.qYear1 & " ") = "" Then
strYear = "[YearID] = '" & qYear1 & "'" & andOR
End If
' Not Trim(Me.qAcq1 & " ") = ""...
Hi Andy,
Error at same point but now the date shows twice in the intermediate window:
25/09/16
25/09/16
[Acquired] = #25/09/16# AND
I ran the Tek Tips Documenter and I can confirm that the field is set as a date: Acquired dbDate. Is there anywhere else that I should have specified date...
Hi Andy,
Thanks for your help. I no longer get the error in that section of the code. It is now further down (red text):
If Not Trim(Me.qAcq1 & " ") = "" Then
Debug.Print Me.[qAcq1].Value
strAcquired = "[Acquired] = #" & Format(Me.[qAcq1].Value, "dd\/mm\/yy") & "#" & andOR
Debug.Print...
OK - I renamed Date to Acquired and qdate1 to qAcq1
Now when I select a date from the qAcq1 drop down, I get a Run Time Error 13 Type Mismatch error, which points at the following line of code:
strAcquired = "[Acquired] = #" & Format(Me.[qAcq1].Value, "dd\/mm\/yy") & "#" & andOR
I've...
Hi Andy,
I am not getting any debug errors in the script. I'm getting a pop-up box whenever I select a date from the dropdown box (qDate1) in the filter form:
I believe that the module code is generating this but I am not 100% sure.
I'll go through and change the field name Date to...
Some years ago MajP was kind enough to let me use a very nice filter in a database I was putting together. I've since adapted this database to serve a hobby of mine and have added a couple of new search parameters. However, I cannot get one of these to work. The field in question is a date...
Thanks Golom.
I have read the pages you pointed to and also some others and I am confused, as some seem to suggest that 32-bit code will work in the 64-bit version of Access 2010 but not the other way around.
Additionally, it seems that have a copy of Access 2010 in order to test any changes...
Thanks PHV,
I'll take a look at the class modules. By the way - I posted the link to the database, as I have often been asked to do this in the past. I wasn't expecting someone to simply fix it for me.
Hello,
I received a lot of help here in the past with a tool log database, which was built and working well in Access 2003 (and still is). I have since shared it with some retired folk on a machining forum, so their wives have a record of what their tools and equipment is worth, should they...
Thanks MajP,
I made the changes and it has fixed the error that I was getting. However, it has now revealed some other issues.
If you try to search with the search type set as "OR", the sub category doesn't appear to do anything (which makes sense given that it should narrow the tool type...
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.