过程太大怎么拆分(附部分代码)
Case 511 To 512If recshap.Fields("id").ValueAsString = "1" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH01.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "2" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH02.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "3" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH03.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "4" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH04.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "5" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH05.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "6" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH06.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "7" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH07.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "8" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH08.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "9" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH09.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "10" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH10.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "11" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH11.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "12" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH12.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "13" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH13.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "14" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH14.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "15" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH15.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "16" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH16.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "17" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH17.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "18" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH18.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "19" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH19.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "20" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH20.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "21" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH21.jpg")
Load frmquery
ElseIf recshap.Fields("id").ValueAsString = "22" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH22.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "23" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH23.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "24" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH24.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "25" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH25.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "26" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH26.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "27" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH27.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "28" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH28.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "29" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH29.jpg")
frmquery.Show
ElseIf recshap.Fields("id").ValueAsString = "30" Then
Load frmquery
frmquery.Image2.Picture = LoadPicture("D:\延安空间信息系统数据\柱状图\硝酸盐\YH30.jpg")
frmquery.Show
Else
Load frmquery
frmquery.Show
frmquery.Refresh
End If