08. oktober 2002 - 13:00Der er
21 kommentarer og 1 løsning
Datadiff problem
Hej
Win. xp, office xp Jeg anvender funktionen datediff uden problem i min database. Jeg har invisteret i office developer. Jeg anvender office developer til at lave en installationspakke. Denne installerer jeg på en maskine der indeholder win 95, men office xp. Så får jeg fejlen 'Function is not avalible in expression in query 'Datediff("D",date(),[opfølgningsdato]) Opfølgningsdatoen kommer ind som parameter, hvilket virker fint nok.
Jeg har på fornemmelsen, at der måske mangler en reference jeg selv skal sætte på. På win95 maskinen er der ikke nogle punkter der står som missing under references.
Med version 7 af TeamShare tager Lector næste skridt og bygger en platform for AI-agenter, der i højere grad kan følge medarbejderen gennem hele arbejdsprocessen.
The program is an MDB, no installation of Access Runtime. Office XP is installed on the win95 machine. Actually I write it Datediff("d",date(),[opfølgningsdato])
Can you use datediff WITHOUT a parameter? and have you tried it in VBA? If you open the debug window (Ctrl+G while in code view) and then enter ?DateDiff("d",Date(), Date()+1) for example?
In the immediate windows your example works fine. The parameter [opfølgningsdato] was not listed in the list of parameters, but even if I entered the value, it didnt make any difference. I tried to create a new database on the win95 machine with the exact same query (copy to clipboard). Then it works. The installation db, however is protected with users- and group settings. Maybe there is a difference...
Torben, IF you create [opfølgningsdato] as a PARAMETER you can choose the data type (date). When you do it this way then Access enusres that it IS a valid date BEFORE running the query. Not that I think this is the problem.
I just remembered something: When I use the guide to create the package, I get an error in the step just before the list of files that is included in the package. It says: Method '~' of object '~' failed. But I can continue and I dont have any compilation-errors, and no missing references. Therefore I just continued. I will try to make a whole new installation package...
Torben, that error you are getting makes me think that the error is actually in the Win/Office XP installation! Your getting the error on that machine I assume! So if you do try and make a new kit then IF you get an error I would look there first!
I tried to make a new installationpackage in the same database. I still get the error-message. I tried then to use the package-guide on another database. Here it works fine without any errors...
It seem to work. I dont get the error no more, but I have a slight problem restoring my references. I use a activex-control MSComCtl2.MonthView.2 But it is not recognized in the new database. Cant remember how I got it? Do you know?
I have NEVER used the setup wizard in XP but in 97 you should just add it to the list of file as you do the MDB. You obviously need to set th edestination directory to winsyspath.
BUT thiis control MAY not come from Access, which means that you may not have a license to distribute it with your kit. I have a feeling that it comes with VB!
Yes it can be distributed fine, if i include it manually by the office developer. I agree about the unexplainable problems, you first try all the logical stuff and then you try all the wird, unexplainable stuff.
Thanks again
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.