Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
private const aquarium_num as string = "フォーム1"
private accounting as collection
if not Water() then GoTo exit_proc
private function Water() as boolean
const animal_num as string = "Water"
dim tSQL as string
dim aquarium as dao.recordset
on error GoTo err_proc
Water = false
tSQL = ""
tSQL = "select 水族館ID,都道府県ID from リアルタイム情報"
tSQL = tSQL & "where 集計日 = " & clng(format(me.txtdate.value,"yyyymmdd"))
set aquarium = dbinfo.OpenRecordset(tSQL,dbOpenDynaset)
with aquarium
do until .eof
accounting.add true, .fields(0).value & "#" & .fields(1).value
end with
set aquarium = nothing
Water = true
exit function
if not aquarium is nothing then set aquarium = nothing
call showmsg(aquarium_num,animal_num,err_description)
end function
if not aquarium is nothing then set aquarium = nothing
if not accounting is nothing then set accounting = nothing
end sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.