?
Solved

AllowZeroLength

Posted on 2003-03-21
5
Medium Priority
?
145 Views
Last Modified: 2011-10-03
hi
  i want to create a table in access 97 through vb in which i want to set field property i.e
AllowZeroLength = Yes. How can i do this?


thnxs
0
Comment
Question by:jatinderbahl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
5 Comments
 
LVL 18

Expert Comment

by:1William
ID: 8181672
in the table properties, set AllowZeroLength to Yes
0
 
LVL 18

Expert Comment

by:1William
ID: 8181700
Take a look at help under AllowZeroLength Property
0
 
LVL 18

Accepted Solution

by:
1William earned 200 total points
ID: 8181707
Sub ZeroLengthField()
     Dim dbs As Database, tdf As TableDef, fld As Field

     ' Return reference to current database.
     Set dbs = CurrentDb
     ' Return reference to Employees table.
     Set tdf = dbs.TableDefs!Employees
     ' Create new field in Employees table.
     Set fld = tdf.CreateField("SpouseName", dbText, 15)
     ' Allow zero-length strings in field.
     fld.AllowZeroLength = True
     ' Append Field object.
     tdf.fields.Append fld
     Set dbs = Nothing
End Sub
0
 
LVL 18

Expert Comment

by:1William
ID: 9054108
I see you are all set now.  :)
0
 
LVL 18

Expert Comment

by:1William
ID: 9231206
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept question, points to 1William
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

1William
EE Cleanup Volunteer
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question