Since your using a string variable a null will return as Empty not null.
Try commenting out the code for:
but leave in the:
line.
I won't guarantee that this will work. But I'm thinking it should.
The problem is that you're using:
"B15790 or B16210"
as your filter criteria.
Which is looking for an instance that matches the whole string.
What your criteria needs to be is:
"B15790" or "B16210"
I'll see if I can figure out how to get it to work in your database.
Well, the function that your having problems with is held in the netapi32.dll you could be missing this file (but it seems like that's file that should be on your computer). Check your \System32 folder for this file.
I ran your file after removing all the .Text and it worked perfectly. I am using Office XP which could be the difference (but I didn't upgrade the file). Might be that one of the API functions isn't working for Access 97 quite as it should.
Two things you might want to try. Put a break...
You could just build a query that calculates the number of entries per day per person and then place a DLookup in your Text box.
so your query would be:
SELECT Count([Data Table].User) AS CountOfUser
FROM [Data Table]
GROUP BY [Data Table].USER, [Data Table].[DATE ENTERED]
HAVING ((([Data...
In the data table that your users are inputting information to; do you have fields for Date Entered and Entered by?
If you did then you could just query your table to count the number of entries for Date Enterred = Today() for current User.
You just need to create code to check the extension of the file.
The following function should do the trick:
Function isMDB(strFile As String) As Boolean
Dim lngDotPos As Long
Dim lngStrLength As Long
Dim lngRight As Long
Dim strType As String
lngDotPos = InStrRev(strFile, ".")
lngStrLength =...
If your talking items on a form then you could use a Microsoft Forms 2.0 frame to create your form and then all you'd need to do is hide the frame. But I think that would get really annoying... especially if you'd already built your form.
What I would do is to create a collection and then fill...
I suppose I should get used to working with Option Explicit.
I've added lines to declare the three variables that were missing. And the code should work without a problem.
Sub saveAttachments()
Dim myOlApp As Outlook.Application
Dim myNameSpace As Outlook.NameSpace
Dim myAttachment As...
What version of Access are you using?
But there must be something more involved then, because if you type:
?Val("5005 005")
into the immediate window you get:
5005005
Does it do that for you?
Before I give you the answer I wanted to point out a couple of problems with your code.
*******************
strFolder = "C:\DUMP"
If strFolder = "" Then
MsgBox "Could not get Temp folder", vbOKOnly
GoTo ExitSub
End If
*******************
This will never pop-up the message box. Your if...
If you added 7 days to 01/02/1999 you'd get 01/09/1999 you'd do this by:
DateAdd("d", 7, "01/02/1999")
But since you seem to want to add 7 months:
DateAdd("m", 7, "01/02/1999")
Look up DateAdd in Help and it will explain the function in detail.
What are you trying to do with the group by? If you use group by you need an aggragate function for the other fields in your table (i.e. Count, Sum...)
I would suggest actually creating the query you want with your Where clause filled in using a valid values, then copy and past the SQL into...
Whenever I've used file dialog I've never set it as an object.
Try it this way:
with Application.FileDialog(msoFileDialogOpen)
It should just open the dialog and then returns a selection set of the files (or single file if you don't have .AllowMultiSelect set to True)
Let me know if this...
I'm a tad confused.
Shouldn't your date conversion read like this:
CDate(Mid(myFld,3,2) & "/" & Right(myFld,2) & "/" & Left(myFld,2))
The way you show it would read 980213 as 98/02/13.
I've found that the following code will allow you to copy and paste your vba macro directly from Word (or Excel) into Access and just by adding "." in front of the applications members will run the macro.
So say you have a macro that looks like this:
Selection.WholeStory...