質問編集履歴

2

誤字

2017/04/21 04:22

投稿

MP430
MP430

スコア40

test CHANGED
File without changes
test CHANGED
@@ -50,7 +50,7 @@
50
50
 
51
51
  Dim frm As [Form_ALL注文在庫 F]
52
52
 
53
- Set frm = [Form_注文在庫 F]
53
+ Set frm = [Form_ALL注文在庫 F]
54
54
 
55
55
  Dim ctl As Control
56
56
 

1

追記

2017/04/21 04:22

投稿

MP430
MP430

スコア40

test CHANGED
File without changes
test CHANGED
@@ -43,3 +43,29 @@
43
43
  Access2016
44
44
 
45
45
  VBA
46
+
47
+ ###追記
48
+
49
+ Public Function MemoAdd()
50
+
51
+ Dim frm As [Form_ALL注文在庫 F]
52
+
53
+ Set frm = [Form_注文在庫 F]
54
+
55
+ Dim ctl As Control
56
+
57
+ DoCmd.OpenForm frm.Name, acDesign
58
+
59
+
60
+
61
+ Set ctl = CreateControl(frm.Name, acLabel)
62
+
63
+ End Function
64
+
65
+ 上記コードに変更したところ
66
+
67
+ CreateControlのfrm.nameが
68
+
69
+ プロシージャの呼び出しまたは、引数が不正ですのエラーに変わりました。
70
+
71
+ set ctlの前まではコードに問題なさそうです。