5 replies
by onbliss
Yes it is possible. Check out ADOX and ADO.
Here is an useful link: http://www.4guysfromrolla.com/webtech/013101-1.shtml
by kargall
by amartyat
Add an ADO Control with Datagrid control to access the Tables in Access Database (*.mdb) then to add and save with a new name use ccdlgcontrol to save
and sql Create Statement to create new db. If it works plz do drop a line at amartyat@gmail.com
by thydzik
from my understanding you want to check if fields exist, and if they don't you would like to create them.
to see if fields exist, use the following function:
Function fieldExists(s As String, ByRef tablename As String) As Boolean
Dim temp As String
On Error Resume Next
temp = CurrentDb.TableDefs(tablename).Fields(s).Name
If Err.Number = 0 Then
fieldExists = True
ElseIf Err.Number = 3265 Then
fieldExists = False
Else
fieldExists = False
End If
End Function
to create a field you would use something like this:
db.TableDefs(tablename).Fields.Append db.TableDefs(tablename).CreateField(param, dbText, 25)
finally, if you want to save this table as a different name, you should make a copy of the table at the start, using the method
DoCmd.CopyObject
This discussion is closed to new replies.
Trending IT Employment posts
Sort by Trending