M
Michael
My first question...
Why is it that the following line of code does not work with the
dbDecimal type, but it does work with dbText, dbMemo, dbDate, dbBoolean,
dbCurrency, dbLong, dbInteger, dbByte, dbSingle, and dbDouble? I listed all
of those because I can not imagine my syntax being wrong if only 1 out of 11
fail. I am using Access 2003 if it helps. What am I doing wrong? The code
I am using is:
With tdfTable
.Fields.Append .CreateField(strLabel, dbDecimal)
End With
I get an error that says that dbDecimal is an invalid type.
My second question is regarding linked tables...
I have a database that I used the splitter on. I am trying to
programatically create some querries in the back-end and also update some
records in other databases. I have no problem creating a database object for
the other databases using the following line:
Set dbNamed = OpenDatabase(strPath & strName, _
True)
When it gets to the back-end database I get an error saying that the
database is already opened exclusive by user admin. I figured that since the
tables were linked it might already be opened and be a part of the default
workspace. I tried looping through to see if it was there, but I do not see
it. How do I access the back-end database? The following is how I was
trying to find it:
Dim dbsLoop As Database
Dim wrkDefault As Workspace
For Each wrkDefault In Workspaces
For Each dbsLoop In wrkDefault.Databases
MsgBox dbsLoop.Name
Next dbsLoop
Next wrkDefault
Any help is appreciated!
Thank you,
Michael
Why is it that the following line of code does not work with the
dbDecimal type, but it does work with dbText, dbMemo, dbDate, dbBoolean,
dbCurrency, dbLong, dbInteger, dbByte, dbSingle, and dbDouble? I listed all
of those because I can not imagine my syntax being wrong if only 1 out of 11
fail. I am using Access 2003 if it helps. What am I doing wrong? The code
I am using is:
With tdfTable
.Fields.Append .CreateField(strLabel, dbDecimal)
End With
I get an error that says that dbDecimal is an invalid type.
My second question is regarding linked tables...
I have a database that I used the splitter on. I am trying to
programatically create some querries in the back-end and also update some
records in other databases. I have no problem creating a database object for
the other databases using the following line:
Set dbNamed = OpenDatabase(strPath & strName, _
True)
When it gets to the back-end database I get an error saying that the
database is already opened exclusive by user admin. I figured that since the
tables were linked it might already be opened and be a part of the default
workspace. I tried looping through to see if it was there, but I do not see
it. How do I access the back-end database? The following is how I was
trying to find it:
Dim dbsLoop As Database
Dim wrkDefault As Workspace
For Each wrkDefault In Workspaces
For Each dbsLoop In wrkDefault.Databases
MsgBox dbsLoop.Name
Next dbsLoop
Next wrkDefault
Any help is appreciated!
Thank you,
Michael