Skip to main content

AccessTr.neT


Form üzerindeki textbox, label VBA ile silme

Form üzerindeki textbox, label VBA ile silme

Çözüldü #7
DeleteControl nasıl kullanılacağını bulamadım
object browser da şöyle yazmış

Sub DeleteControl(FormName As String, ControlName As String)

bende kod arasına

Set ctl = DeleteControl("Form2", "Mytextbox1")

yazdım
tabiki oda kabul etmedi

Sub DeleteControl(FormName As String, ControlName As String)

nasıl kullanılmalı
nette şöyle bir kod buldum

Public Function clearForm()

Dim ctl As Control, ctls As Controls
Dim frm As Form
Dim x As String

DoCmd.openForm "JSA Form V2", acDesign

Set frm = Forms![JSA Form V2]
Set ctls = frm.Controls

For Each ctl In frm.Controls
x = Mid(ctl.Properties("Name"), 1, 1)
If x = "X" Then
DeleteControl frm.Name, ctl.Properties("Name")
End If
Next

DoCmd.Close acForm, "JSA Form V2", acSaveYes

End Function
Masalcı, 21-01-2010 tarihinden beri AccessTr.neT üyesidir.
Son Düzenleme: 25/02/2010, 12:59, Düzenleyen: Masalcı.
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
Cvp: Form üzerindeki textbox, label silme - Yazar: Masalcı - 25/02/2010, 12:52