Modify Access-defined properties

  • Thread starter Thread starter Bald0z
  • Start date Start date
B

Bald0z

I am working on Access 2003 with ADP and SQL Server.
I would like to programmatically modify some Access-defined properties
of a table, like DecimalPlaces or InputMask of a field.

I found some examples on the net, though:
- I can't use DAO as I'm working with ADP.
- The ADO way I found is read-only.
- The ADOX way I found doesn't seem to find the properties I need.

This is what I found related on MSDN:
http://msdn.microsoft.com/library/d.../achowSettingPropertiesOfActiveXObjectsVB.asp

I tried to do what it's explained in the MSDN article but I had no
luck. Could anyone try to give me a code snippet to work it on? I lost
almost 4 hours on this "stupid" thing yesterday.
Of course, I can't use any SQL or server-related command because those
are properties saved into the .ADP file by Access.

Thank you for your time,
Marco
 
See if the properties you're looking at are stored as extended properties in
the SQL Server database. Here's a sql statement that returns all extended
properties for all columns in a table. The extended properties only exist
once you've set a value, so set some values first.
SELECT *
FROM ::fn_listextendedproperty (NULL, 'user', 'dbo', 'table',
'MyTableName', 'column', default)

If the properties you want are included, look in BOL for the sp's that
retrieve or set extended properties.
Paul Shapiro
 
See if the properties you're looking at are stored as extended properties in
the SQL Server database.

Thanks for your answer, Paul.
I already checked what you said, though the properties I need to
modify are Access properties, that are not stored in the database.
They are just "visual" properties and are all handled by Access.
So, no luck with SQL statements :(
 
I just posted a similar question with the subject line 'Programatically
setting "Description" of ADP forms', you might want to watch that thread as
well. (I'll be watching this one...)

Regards,
Brian
 
Alas, the combination of ADO and ADOX is not as complete, in some ways, as
DAO. In other ways, it allows you to do things you can't do in DAO. At one
time, Microsoft seemed to be pushing "classic ADO" as the Access method of
choice for server databases; recent word from knowledgeable Microsoft
insiders is that DAO-ODBC is at least equally often the Access method of
choice.

Larry Linson
Microsoft Access MVP
 
Back
Top