Hi i was given the following advise,below my OriginalQuestion
I am a little new to ADOX can you direct me to the following
Do i place the code behind a button on a form?
Or do i place it in the On Open event and have a the default 10% and
give the user the option to change it to 0%
I have referenced th appropriate library and the default value of the
field to change is 0.1
My original question is
I want to do the following
A user decides if they want all orders reports etc to include 10% tax or
0% tax
Now i have set the default value in my [TAX]field in the tblOrders to .1
(10%) if i go back to the tbl in design view and change this to 0% all
works well.
I now want to somehow; allow the user to change this from a form as the
user has no access to the design view.
Can i call the default value in the tblOrders design view or any ideas
Regards
DD
This was the advise given
Posting Via Google so not sure if someone's already answered...
Using DAO
check out the defaultvalue property of the field object.
eg
in the debug window
?Currentdb.Tabledefs("Orders").Fields("Tax").Defau ltValue
Using ADOX
dim cat as ADOX.Catalog
'open your catalog
Set cat = New ADOx.Catalog
cat.ActiveConnection = strConn
catalog.tables("Orders").columns("Tax").Properties ("Default").Value
Reference the relevant library and hit F2 and check out the various
objects you can use.
Peter
DD
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!