Hi all!!
Sorry for asking such an esay question ... but what do i have to do to use windows api functions into an VBA access module ?
I think I have to include a library, but which one ??
thx in advance
you can try the Dir function :
dim str as string
str = Dir(yourPath)
If the path doesn't exists, the function will return ""
Else ... I don't really remember, it just return something different from ""
One way is to change the rowSource of the Subcategory. You can do it on OnChange function of the Category.
It's something like :
Private sub Categorie_change()
Me.SubCategory.Rowsource = "SELECT * FROM SubCategorie WHERE Cat_ID = " & Me.Categorie.Value
End sub
Of course the...
If you only need one value on one table, you can use DLOOKUP function :
dim serverIP as string
serverIP=Dlookup("serverIP","tblServerList", _
"serverType = " & currentServer & " and serverName=" currentServerNumber)
That's all
Public Sub connection()
If Command <> "" Then
DoCmd.Hourglass True
DoCmd.OpenForm "Synchronisation"
DoEvents
synchroniser Command, Importer
DoCmd.Close acForm, "Synchronisation"
DoCmd.Hourglass False
End If
End...
did you try the isnumeric function ?
iif(isnumeric(pick_location)=True,"BULK", "CAGE")
It will return BULK if pick_location is numeric, CAGE else. I suppose if pick_location isn't numeric, it is alphanumeric.
This is the part of the code where I have a problem :
Public function connexion()
If Command<>"" then
...
...
end if
End if
* This function is called by an Autoexec macro, and it's the first thing the application do. I use it to set some...
Instead of using iif and test if the value is null, you can use Nz function, it is exactly done to perform this job, so I think it is a bit faster :
Use VBA help to know how it works.
Thanks for replyind Jim !
No, I load forms one after the other, and when I quit a form, I close it instead of hidding it.
Moreover, the message appears at the beggining of the application, before opening the first form.
I've done some tests since my last post : When I use the function...
I'm currently developping a database with access 2002 on windows XP.
It works well on my PC, and on any other windows XP PC.
Now I need to install the base on a windows 98 PC(196 Mo of RAM), using access 2002. When I run Access, I use an autoexec macro to run VBA code. In windows 98, I get an...
OK, thanks susanhawk !
I know Replication presents many many problems, but I didn't have the choice ...
I did save the database before replicating it ... but It was a month ago, so I don't want to lose one month of work !!!
Since the master database doesn't countain any data (I use it to...
In my database, I use replicatoin to allow some users to have the data on their laptop, without being connected to the serveur.
After a whole week to setup replication and synchronisation in the base, i thougt all was fine ...
Today, I modified the structure of a table, adding a field named P...
Yes, I had understood.
But in my case, the number is a code :
two numbers for the year, and three for the number of the folder. So, ther will be no problem until the 999th folder in year 999 !!!
What is much better is to put Nz function on ORDER BY. With this method, the number isn't...
Good idea, but I need to display the number .
But, in the form I can do iif([Number]<>"zzzz";[Number];"")
and the job is done !!!
Thanks a lot John !!
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.