Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8327531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:08:34+00:00 2026-06-09T01:08:34+00:00

Part of a project I am working on is programmatically create a series of

  • 0

Part of a project I am working on is programmatically create a series of MDB files which will be the final deliverables. The specs from the client ask for some fields in the tables to have 3 decimal places.

I create the mdb files using python at first, and then to be able to alter the columns to DECIMAL (10,3), I use ADODB (C#, .NET 4.0) – as i couldn’t find something suitable in Python. Problem though is that this will not be enough for the client. They want to open the MDB and in Design Mode to see the Decimal places for these fields to be set to 3. If they are not, the file is not accepted.

It has now taken me the best part of 3 days trying to come up with a solution. One likely candidate was DAO and the Field2 object but this object has so far eluded me. I am using the Microsoft DAO 3.6 Objects but Field2 doesn’t seem to be part of the assembly. And dont even know if this will actually do what is required…

Does anyone know a way to do this? Don’t care if its DAO, ADO, OLEDB or any other 3 letter acronym to be honest? How can I get from this:

enter image description here

to this – PROGRAMMATICALLY??

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T01:08:36+00:00Added an answer on June 9, 2026 at 1:08 am

    I can tell you how to do this in VBA/DAO, which may give you some ideas. You must append the property first:

    sSQL = "create table testX (id counter, anumber decimal(10,3))"
    CurrentProject.Connection.Execute sSQL
    
    Dim db As Database
    Dim tdf As TableDef
    Dim fld As dao.Field
    
    Set db = CurrentDb
    
    Set tdf = db.TableDefs("testX")
    Set fld = tdf.Fields("anumber")
    'fld.Properties("DecimalPlaces") = 3
    Set prp = fld.CreateProperty("DecimalPlaces", dbByte, 3)
    tdf.Fields("anumber").Properties.Append prp
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a small design project, part of which involved writing out text
I'm currently working on a re-platforming project, part of which involves a few dozen
As part of a project I'm working on, we're migrating from Velocity to JSP.
A part of the source code for a project I'm working on, which is
I am part of a student project working to create a free educational chemistry
I'm working on project. One part of it is read given folders files. Program
For part of a project I'm working on I am implementing a RTPpacket where
I'm working with DataNucleus as part of a Google App Engine project and I'm
I'm working on a project using Scala running Selenium tests as part of a
I'm working on a CakePHP project and am currently building the user authentication part

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.