質問編集履歴
1
作動するようになったため、コードを追記しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -117,3 +117,63 @@
|
|
117
117
|
End Sub
|
118
118
|
|
119
119
|
```
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
### PrimaryKey追加後
|
124
|
+
|
125
|
+
以下のコードで動作確認できました
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
```ここに言語を入力
|
130
|
+
|
131
|
+
Private Sub OpenFormB_Click()
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
Dim Con As Connection
|
136
|
+
|
137
|
+
Dim RST As New ADODB.Recordset
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
Set Con = CurrentProject.Connection
|
142
|
+
|
143
|
+
Set RST = New ADODB.Recordset
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
With RST
|
148
|
+
|
149
|
+
.Open "LinkTable", Con, , adLockOptimistic
|
150
|
+
|
151
|
+
Do Until .EOF
|
152
|
+
|
153
|
+
.Delete
|
154
|
+
|
155
|
+
.MoveNext
|
156
|
+
|
157
|
+
Loop
|
158
|
+
|
159
|
+
RST.Close
|
160
|
+
|
161
|
+
Con.Close
|
162
|
+
|
163
|
+
End With
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
Set RST = Nothing
|
168
|
+
|
169
|
+
Set Con = Nothing
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
DoCmd.OpenForm "FormB", acNormal, "", "", , acNormal
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
End Sub
|
178
|
+
|
179
|
+
```
|