PC Review


Reply
Thread Tools Rate Thread

DecimalPlaces Property

 
 
James Napolitano
Guest
Posts: n/a
 
      8th Jun 2004
Is their a way to set the DecimalPlaces property in code
when appending a field object?
Thanks.
 
Reply With Quote
 
 
 
 
Marshall Barton
Guest
Posts: n/a
 
      8th Jun 2004
James Napolitano wrote:

>Is their a way to set the DecimalPlaces property in code
>when appending a field object?


Yes, but since that's one of the Access custom properties
(as opposed to the Jet builtin properties), you have to
create the property yourself.

Here's some code that does this for the Caption property:

Set dbCur = CurrentDb()
Set tdf = dbCur.TableDefs("ZZZ")
Set fld = tdf.CreateField("MyField", dbLong)
tdf.Fields.Append fld
Set prp = fld.CreateProperty("Caption",dbText,"abc")
fld.Properties.Append prp
fld.Properties.Refresh
tdf.Fields.Refresh
--
Marsh
MVP [MS Access]
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: decimalplaces property?? =?Utf-8?B?TWFnZ2ll?= Microsoft Access Database Table Design 1 26th Jun 2006 03:55 AM
RE: decimalplaces property?? privatenews Microsoft Access Database Table Design 0 23rd Jun 2006 04:07 AM
Property Format and DecimalPlaces TNL Microsoft Access VBA Modules 2 20th Jul 2004 07:21 AM
DecimalPlaces Property Terry Roberts Microsoft Access Database Table Design 2 31st May 2004 06:46 AM
Update DecimalPlaces property Mick Microsoft Access Database Table Design 1 9th Nov 2003 12:02 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:31 PM.