sepertinya gak bisa pake DDL pada query design mas.
harus pake prosedure (public Sub) pada Modul.
memanfaatkan DAO objek.
kira2 begini :
---untuk display control
Set NamaField = tdf.Fields("Kelamin")
Set SetingProperty = NamaField.CreateProperty("DisplayControl", dbInteger, acCheckBox)
NamaField.Properties.Append SettingProperty
'---untuk format
Set NamaField = tdf.Fields("TglLahir")
Set SetingProperty = NamaField.CreateProperty("Format", dbText, "Long Date")
NamaField.Properties.Append SettingProperty
From: CGSATU <cgsatu@yahoo.com>
To: "belajar-access@yahoogroups.com" <belajar-access@yahoogroups.com>
Sent: Thursday, 5 September 2013, 8:30
Subject: [belajar-access] DDL
harus pake prosedure (public Sub) pada Modul.
memanfaatkan DAO objek.
kira2 begini :
---untuk display control
Set NamaField = tdf.Fields("Kelamin")
Set SetingProperty = NamaField.CreateProperty("DisplayControl", dbInteger, acCheckBox)
NamaField.Properties.Append SettingProperty
'---untuk format
Set NamaField = tdf.Fields("TglLahir")
Set SetingProperty = NamaField.CreateProperty("Format", dbText, "Long Date")
NamaField.Properties.Append SettingProperty
Assalamu'alaykum Wr Wb
Kind Regards
Wassalamu'alaykum Wr Wb
aNITRA upanda hafas
Kind Regards
Wassalamu'alaykum Wr Wb
aNITRA upanda hafas
From: CGSATU <cgsatu@yahoo.com>
To: "belajar-access@yahoogroups.com" <belajar-access@yahoogroups.com>
Sent: Thursday, 5 September 2013, 8:30
Subject: [belajar-access] DDL
Sorry, mau tanya, ada yang tahu tidak ya....
misal saya buat tabel dengan DDL sbb :
CREATE TABLE Pegawai
([PegawaiID] COUNTER,
[Namadepan] TEXT(12),
[Namatengah] TEXT(10),
[Namabelakang] TEXT(12),
[TglLahir] DATE,
[Telepon] TEXT(14),
[Kelamin] YESNO,
[Catatan] memo,
[Gaji] Currency,
CONSTRAINT [Index1] PRIMARY KEY ([TemanID]));
[Namadepan] TEXT(12),
[Namatengah] TEXT(10),
[Namabelakang] TEXT(12),
[TglLahir] DATE,
[Telepon] TEXT(14),
[Kelamin] YESNO,
[Catatan] memo,
[Gaji] Currency,
CONSTRAINT [Index1] PRIMARY KEY ([TemanID]));
Nah, khusus untuk field Kelamin, itu kan boolean. Nah bagaimana agar property Display Control-nya menjadi Check Box. By default itu cuma TextBox.
Terus untuk yang kolom TglLahir kan Date, supaya bisa langsung jadi Long Date parameternya apa ya ?
Makasih :)
cgsatu (Elang)
__._,_.___
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (4) |
SPAM IS PROHIBITED
.
__,_._,___
Tidak ada komentar:
Posting Komentar