Access is capable of this. You could either poll the directory periodically or (if you are API enabled) set up a shell notification. I'd probably just go with the polling periodically unless the time period is very short.
Luther
I don't remember where I got this code, most likely it was some combination of Getz's Developers Handbook and the microsoft Knowledgebase.
This will set a reference to your sheet2:
Dim objXLApp As Excel.Application
Dim objXLBook As Excel.Workbook
Dim objDataSheet As Excel.Worksheet
Set...
I copied this code directly from the MS Knowledgebase search results for "change field data type": ACC: How to Change a Field's Data Type at Run Time with Code (Q128016)
'*****************************************************************
' The AlterFieldType Sub procedure...
My first thought is to base the report on a query and create the calc'd field there. An example calculated field might be: PastDue: iif(now() - DueDate > 14, True, False). Use a totals query and count the True values. This probably isn't the optimal method, but it'll work.
Luther
Well, you caught me in a lie. I don't often open a recordset from a recordset (since it's just as easy to just create another recordset...).
Set the filter property of the 1st recordset and then when the second recordset is created it will implement the filter. Here's the rewritten example...
I'm sorry. It was late.
I believed that you were trying to save the original value of form controls bound to a data table or query prior to editing those values. In foxpro days you would've used Scatter / Gather.
Anyway, for bound controls, Access does this for you in the form of the...
While the RunSelectQuery can return a reference to a recordset (since being unspecified, it's a variant), I would have thought that the recordset it is referencing is destroyed as soon as the code exits RunSelectQuery since the recordset created is local to the function.
If you want to use a...
To have programmatic control over the newly opened database, use automation to open it which will return an application reference you can use to control things. The security is contained in the workspace object so you'd need to create a new work space or clone the default workspace.
Luther
Running this useless function:
Public Function testme()
Dim sTemp As String
sTemp = String(500, "x")
MsgBox sTemp
End Function
proves that strings hold more than 255 chars. Therefore, something else is going on.
I have built functions that do exactly what you're doing...
I use these sql definition statements regularly without issue. However, I never use Currentdb without assigning it to a variable of type Database.
Having said that, I tried your code in an acc97 module, and after commenting out the undeclared vars and functions it worked as is (850 Mhz...
A search of the MS KB gives ACC2000: How to Programmatically Create, Search, Replace, and Modify Code (Q208793) with examples of exactly what you're wanting to do.
Luther
I import megabytes of data daily from a mainframe and have found the Access text import routines to be intolerant of deviations in the specified line length resulting in inconsistent imports (you never know how it's going to fail). My resolution was to write my own import routine based on a...
Here's what I use to get the user/machine list:
As I review the code I just pasted in, several of the functions are from Getz's Access Developers Guide (best book on access I've ever seen) so I don't feel right posting them here but heres what they do:
dhRInstr - returns the rightmost...
Your code is passing a field object as the argument to the delete method. The method is documented as taking a string containing the name of the field as its argument.
Using your example:
change: tbl.Fields.Delete fld
to: tbl.Fields.Delete fld.name
Luther
I have a similar situation with a datamart type of app. I perform all processing in a master and copy the result tables to the 'shared' copy on a routine basis. If the copy fails, I trap the error, read the .ldb to determine the user, 'net send' a get out message and wait for them to get out...
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.