{"id":313,"date":"2020-01-12T13:00:11","date_gmt":"2020-01-12T04:00:11","guid":{"rendered":"https:\/\/have-stone.iobb.net\/wordpress\/?p=313"},"modified":"2020-01-18T16:10:31","modified_gmt":"2020-01-18T07:10:31","slug":"%e5%ad%a6%e6%a0%a1%e6%97%a5%e8%aa%8c%e7%94%a8%e5%87%ba%e6%ac%a0%e7%ae%a1%e7%90%86%e3%82%b7%e3%82%b9%e3%83%86%e3%83%a05","status":"publish","type":"post","link":"https:\/\/have-stone.iobb.net\/wordpress\/?p=313","title":{"rendered":"\u5b66\u6821\u65e5\u8a8c\u7528\u51fa\u6b20\u7ba1\u7406\u30b7\u30b9\u30c6\u30e05"},"content":{"rendered":"\n
VBA\u306e\u30b3\u30fc\u30c9\u3092\u898b\u3066\u3044\u304d\u307e\u3059\u3002
\u62c5\u4efb\u306e\u767b\u9332\u7528\u3067\u3059\u3002\u4e3b\u8981\u306a\u90e8\u5206\u306fAccess VBA\u9023\u8f091~3\u3067\u793a\u3057\u305f\u57fa\u672c\u7684\u306a\u5185\u5bb9\u3068\u5909\u308f\u308a\u307e\u305b\u3093\u3002
\u767b\u9332\u30dc\u30bf\u30f3\u3068\u8a02\u6b63\u30dc\u30bf\u30f3\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u6700\u521d\u306f\u8a02\u6b63\u30dc\u30bf\u30f3\u304c\u7121\u52b9\u3067\u3059\u3002
\u5404\u9805\u76ee\u3092\u5165\u529b\u3057\u767b\u9332\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3068\u3001\u30dc\u30bf\u30f3\u306e\u6709\u52b9\u30fb\u7121\u52b9\u304c\u53cd\u8ee2\u3057\u307e\u3059\u3002(\u8a02\u6b63\u30dc\u30bf\u30f3\u3060\u3051\u304c\u6709\u52b9\u3068\u306a\u308b\u3002)
\u305f\u3060\u3057\u3001\u305d\u306e\u5834\u3060\u3051\u306e\u5165\u529b\u30df\u30b9\u3092\u8a02\u6b63\u3059\u308b\u3082\u306e\u3067\u3001\u5f8c\u304b\u3089\u30df\u30b9\u306b\u6c17\u4ed8\u3044\u3066\u8a02\u6b63\u3057\u3088\u3046\u3068\u3057\u3066\u3082\u3067\u304d\u306a\u3044\u4ed5\u7d44\u307f\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u62c5\u5f53\u8005\u304c\u65e5\u8a8c\u3092\u5370\u5237\u3057\u3066\u304b\u3089\u8a02\u6b63\u3057\u3066\u3082\u53cd\u6620\u3055\u308c\u306a\u3044\u304b\u3089\u3067\u3059\u3002\u3053\u308c\u306f\u5148\u306b\u8aac\u660e\u3057\u305f\u901a\u308a\u3067\u3059\u3002
\u8a02\u6b63\u3057\u3088\u3046\u3068\u518d\u5ea6\u62c5\u4efb\u304c\u3053\u306e\u30d5\u30a9\u30fc\u30e0\u3092\u958b\u304f\u3068\u3001\u767b\u9332\u30dc\u30bf\u30f3\u306f\u6709\u52b9\u3067\u3059\u304c \u4e8c\u91cd\u767b\u9332\u306b\u306a\u308b\u306e\u3067\u3001\u300c\u8a02\u6b63\u304c\u3042\u308b\u5834\u5408\u306f\u62c5\u5f53\u8005\u306b\u9023\u7d61\u3057\u3066\u304f\u3060\u3055\u3044\u300d\u3068\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51fa\u3057\u307e\u3059\u3002(\u8a02\u6b63\u30dc\u30bf\u30f3\u306f\u6709\u52b9\u306b\u306f\u306a\u308a\u307e\u305b\u3093\u3002)<\/p>\n\n\n
Private Sub cmd_AddNew_Click()\n\n Dim db As DAO.Database\n Dim rs As DAO.Recordset\n Dim rc As Integer '\u767b\u9332\u6e08\u307f\u30c7\u30fc\u30bf\u3092\u8abf\u3079\u308b\u305f\u3081\n \n' LoginName\u304c\u4f7f\u3048\u306a\u3044\u5834\u5408\u306f\u3001\u30b3\u30f3\u30dc\u30dc\u30c3\u30af\u30b9\u304b\u3089\u30af\u30e9\u30b9\u3092\u9078\u629e\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044 \n' If IsNull(cmb1) Then\n' MsgBox \"\u30af\u30e9\u30b9\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3044\"\n' Exit Sub\n' End If\n'\n'\u4ee5\u4e0b\u3001\u30af\u30e9\u30b9\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u524d\u63d0\n\n \n Set db = CurrentDb()\n Set rs = db.OpenRecordset(\"T_everyday\")\n \n'\u30c7\u30fc\u30bf\u304c\u767b\u9332\u6e08\u307f\u304b\u3092\u8abf\u3079\u308b\n rc = DCount(\"*\", \"T_everyday\", \"Class_Id='\" & Me.cmb1.Column(0) & \"'\" & \" And \" & \"N_date='\" & Me.T_date & \"'\")\n If rc > 0 Then\u3000'\u767b\u9332\u6e08\u307f\n MsgBox \"\u8a02\u6b63\u304c\u3042\u308b\u5834\u5408\u306f\u62c5\u5f53\u8005\u306b\u9023\u7d61\u3057\u3066\u304f\u3060\u3055\u3044\u3002\"\n Exit Sub\n Else '\u65b0\u898f\u767b\u9332\n rs.AddNew\n rs!Class_Id = cmb1.Column(0)\n rs!N_date = T_date\n rs!N_ketu = T_ketu\n rs!N_tiko = T_tiko\n rs!N_sou = T_sou\n rs!N_tei = T_teisi\n rs!N_infu = T_inful\n \n rs.Update\n\n Me.cmd_AddNew.Enabled = False\n Me.cmd_UpDate.Enabled = True\n Requery\n \n End If\n\n rs.Close: Set rs = Nothing\n db.Close: Set db = Nothing\n \nEnd Sub<\/pre>\n\u00a0<\/p>\n\n\n
<\/p>\n","protected":false},"excerpt":{"rendered":"
VBA\u306e\u30b3\u30fc\u30c9\u3092\u898b\u3066\u3044\u304d\u307e\u3059\u3002 \u62c5\u4efb\u306e\u767b\u9332\u7528\u3067\u3059\u3002\u4e3b\u8981\u306a\u90e8\u5206\u306fAccess VBA\u9023\u8f091~3\u3067\u793a\u3057\u305f\u57fa\u672c\u7684\u306a\u5185\u5bb9\u3068\u5909\u308f\u308a… read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":133,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,15],"tags":[5,7,6],"_links":{"self":[{"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/313"}],"collection":[{"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=313"}],"version-history":[{"count":4,"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/313\/revisions"}],"predecessor-version":[{"id":332,"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/313\/revisions\/332"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=\/wp\/v2\/media\/133"}],"wp:attachment":[{"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}