-
-
Save AuroraNorthernQuarter/ca660fa7e18d71c3335b65e743332ba6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public dbinfo as database | |
Public ProcessDate as string | |
・・・ | |
Private const fwater | |
・・・ | |
Private personnel as collection | |
Private m_kazu as collection | |
・・・ | |
Private sub Water_Click() | |
const subf as string ="Water" | |
Dim varCode as variant | |
Dim PrefectureCode as integer | |
Dim KankatsuCode as integer | |
Dim money as collection | |
Dim tSQL as string | |
on error go to err_proc | |
DoCmd.Hourglass True | |
Set money = New Collection | |
Call kansu1 =(money) | |
For Each varCode In personnel | |
PrefectureCode = cint(mid(cstr(varCode),1,1)) | |
KankatsuCode = cint(mid(cstr(varCode),3)) | |
if confirmation(cstr(varCode)) then | |
tSQL = updSQL(PrefectureCode,KankatsuCode,_ | |
clng(money.item(varCode)),clng(m_kazu.item(varCode))) | |
else | |
tSQL = insSQL(PrefectureCode,KankatsuCode,clng(money.item(varCode))) | |
end if | |
dbinfo.execute tSQL | |
Next | |
set money = nothing | |
ProcessDate = format(me.txtdate.value,"yyyymmdd") | |
call kansu2 | |
call showmsg(fwater,subf,"処理完了です",1) | |
DoCmd.Hourglass True | |
Exit sub | |
err_proc: | |
DoCmd.Hourglass True | |
call showmsg(fwater,subf,err.description) | |
End Sub | |
~~~~~~~~~~~~ | |
Private Function confirmation(byval i_date as string) as boolean | |
on Error GoTo not_found | |
m_kazu.item(i_date) | |
confirmation = true | |
Exit Function | |
not_found: | |
confirmation = false | |
End Function | |
~~~~~~~~~~~~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment