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 8514983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:01:00+00:00 2026-06-11T05:01:00+00:00

How can you increase the size of a MDB field size using DAO ?

  • 0

How can you increase the size of a MDB field size using DAO?

  • 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-11T05:01:02+00:00Added an answer on June 11, 2026 at 5:01 am

    From http://www.freevbcode.com/ShowCode.asp?ID=4599:

    Public Sub change_field_size(DBPath as string, _
      tblName As String, fldName As String, fldSize As Integer)
        ' this routine changes the field size
    
        Dim db As Database
        Dim td As TableDef
        Dim fld As field
    
        On Error GoTo errhandler
    
        Set db = OpenDatabase(DBPath)
        Set td = db.TableDefs(tblName)
    
        If td.Fields(fldName).Type <> dbText Then
            ' wrong field type
            db.Close
            Exit Sub
        End If
    
        If td.Fields(fldName).size = fldSize Then
            ' the field width is correct
            db.Close
            Exit Sub
        End If
    
        ' create a temp feild
        td.Fields.Append td.CreateField("temp", dbText, fldSize)
        td.Fields("temp").AllowZeroLength = True
        td.Fields("temp").DefaultValue = """"""
    
        ' copy the info into the temp field
        db.Execute "Update " & tblName & " set temp = " & fldName & " "
    
        ' delete the field
        td.Fields.Delete fldName
    
        ' rename the field
        td.Fields("temp").Name = fldName
        db.Close
    
    '======================================================================
    Exit Sub
    
    errhandler:
    MsgBox CStr(Err.Number) & vbCrLf & Err.Description & vbCrLf & "Change Field Size Routine", vbCritical, App.Title
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

how can we increase or decrese the size of div on btn click in
How can I increase the size of a footer and make the font size
Can I increase the font size of Tabbar title?
How can I increase Java heap size for Carrot2 Document Clustering Workbench?
I want to increase the size of the numbers which label my legend using
How can I increase the font size in Xcode version 3.2.3 When I go
Can somebody please help me out on how to increase the size of the
How can I increase the size of XCode 4's GUI fonts (not the editor,
I'm using access 2000 mdb file with 500 MB size, when I make Select
Can I change marker size on hover? I need increase marker size on hover

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.