yussi ariefiyono

This user hasn't shared any biographical information

Homepage: http://www.yussi.nl


Posts by yussi ariefiyono

display list of table from other database with DAO

this function will display list of table from other database, it come handy if you want to make a tool for inventory of all your db

Sub displayTable()
Dim dbs As Database
Dim otable As DAO.TableDef
Dim ItemName As String
Set dbs = OpenDatabase(“Db Name”)
For Each otable In dbs.TableDefs
If UCase(Left(otable.Name, 3)) <> “MSY” Then
ItemName = otable.Name
ItemName = Replace(ItemName, “,”, “–”)
debug.print ItemName
ItemName = “”
End If
Next otable
Set otable = Nothing
Set dbs = Nothing
End Sub

Access link table from different database with vba

Problem:
you have lots of database with link table in it, and in one time some of path are changed.. rather than change them manually,  i create function that can do that for me :)

Solution:
In this function you can specify the link you want to find and replace it with your new link. it save me lots of time..

Function RelinkTable(setDB As String, FINDtext As String, REPLACEtext As String)
Dim dbs As Database
Dim Tdf As TableDef
Dim Tdfs As TableDefs
Set dbs = OpenDatabase(setDB)
Set Tdfs = dbs.TableDefs
‘Loop through the tables collection
For Each Tdf In Tdfs
If Tdf.SourceTableName <> “” And Tdf.Connect = “;DATABASE=” & FINDtext Then   ‘if its the linktable
Tdf.Connect = “;DATABASE=” & REPLACEtext ‘Set the new source
Tdf.RefreshLink ‘Refresh the link
End If
Next ‘Goto next table
Set dbs = Nothing
Set Tdfs = Nothing
End Function

get the latest file with batch command

Problem:
get the latest file in the folder with batch command, in my case after getting the latest file. i will move it to other directory

Solution:
copy and paste this code, change it according to your need

@echo off
setlocal
:source directory
set srcDir= your source directory
:destination directory
set destdir=your destination directory
set lastmod=
pushd “%srcDir%”
for /f “tokens=*” %%a in (‘dir /b /od 2^>NUL’) do set lastmod=%%a
if “%lastmod%”==”" echo Could not locate files.&goto :eof
:copy
copy “%lastmod%” “%destdir%”
:delete
del “%lastmod%”

enjoy :)

Google Chrome 4 now natively supports Greasemonkey user scripts

One thing that got lost in the commotion of the extensions launch is a feature that is near and dear to my heart: Google Chrome 4 now natively supports Greasemonkey user scripts. Greasemonkey is a Firefox extension I wrote in 2004 that allows developers to customize web pages using simple JavaScript and it was the inspiration for some important parts of our extension system.

Installation is quick and easy, just like installing an extension. That’s because under the covers, the user script is actually converted into an extension. This means that management tasks like disabling and uninstalling work just like they do with extensions.

Also keep in mind that some user scripts won’t work in Google Chrome yet, because of differences between it and Firefox. Based on some analysis that the current maintainers of Greasemonkey did, I expect between 15%-25% of scripts to not work in Google Chrome. If you find such a script, you should consider letting the author know. There may be something he or she can do to easily fix the problem. In the meantime, we’ll keep working on bugs on our side to bring our implementation closer to Greasemonkey.

[ via google]

Why Web Developers Should Switch to Google Chrome

All these tools make a heaven for web-developers:

  • Web Inspector (aka Developer Tools)
  • Accessing the Web Inspector/Developer Tools
  • JavaScript Console
  • Elements Panel
  • Resources

[Via tutsplus]

Get Adobe Flash playerPlugin by wpburn.com wordpress themes