PC Review


Reply
Thread Tools Rate Thread

Active Database

 
 
Nedan Nedzatra
Guest
Posts: n/a
 
      9th Jan 2010
Hia!

Good Morning Friends!

I have checked on appending fields to tables on databases that are not
active but how to do it for the ones that are already open?
 
Reply With Quote
 
 
 
 
BruceS
Guest
Posts: n/a
 
      9th Jan 2010
Nedan,

See http://www.w3schools.com/SQl/sql_alter.asp

Best,
Bruce

"Nedan Nedzatra" wrote:

> Hia!
>
> Good Morning Friends!
>
> I have checked on appending fields to tables on databases that are not
> active but how to do it for the ones that are already open?

 
Reply With Quote
 
Nedan Nedzatra
Guest
Posts: n/a
 
      9th Jan 2010
Hia!

Thanks.

I did it as shown below;

Sub AppendField()

DoCmd.RunSQL " ALTER TABLE [NewTable]ADD column_nam char"

End Sub

So I am going through SQL to do it. Is it possible to do it through VBA
only? Is there something in Access VBA like ActiveDocument or ActiveWorkbook
in Word and Excel VBA?


"BruceS" wrote:

> Nedan,
>
> See http://www.w3schools.com/SQl/sql_alter.asp
>
> Best,
> Bruce
>
> "Nedan Nedzatra" wrote:
>
> > Hia!
> >
> > Good Morning Friends!
> >
> > I have checked on appending fields to tables on databases that are not
> > active but how to do it for the ones that are already open?

 
Reply With Quote
 
Jack Leach
Guest
Posts: n/a
 
      9th Jan 2010
Read up on the TableDefs collection. This model should provide the means.
Although, I would think SQL an easier solution.

hth
--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)



"Nedan Nedzatra" wrote:

> Hia!
>
> Thanks.
>
> I did it as shown below;
>
> Sub AppendField()
>
> DoCmd.RunSQL " ALTER TABLE [NewTable]ADD column_nam char"
>
> End Sub
>
> So I am going through SQL to do it. Is it possible to do it through VBA
> only? Is there something in Access VBA like ActiveDocument or ActiveWorkbook
> in Word and Excel VBA?
>
>
> "BruceS" wrote:
>
> > Nedan,
> >
> > See http://www.w3schools.com/SQl/sql_alter.asp
> >
> > Best,
> > Bruce
> >
> > "Nedan Nedzatra" wrote:
> >
> > > Hia!
> > >
> > > Good Morning Friends!
> > >
> > > I have checked on appending fields to tables on databases that are not
> > > active but how to do it for the ones that are already open?

 
Reply With Quote
 
Nedan Nedzatra
Guest
Posts: n/a
 
      9th Jan 2010
Hia!

Thanks.

I have checked on Tabledefs on closed databases. It works. The problem is
referring to an open database; error occurs saying 'opening prohibited by
admin' because the file is open.

I thought there should be a way to refer to an open database!

"Jack Leach" wrote:

> Read up on the TableDefs collection. This model should provide the means.
> Although, I would think SQL an easier solution.
>
> hth
> --
> Jack Leach
> www.tristatemachine.com
>
> "I haven''t failed, I''ve found ten thousand ways that don''t work."
> -Thomas Edison (1847-1931)
>
>
>
> "Nedan Nedzatra" wrote:
>
> > Hia!
> >
> > Thanks.
> >
> > I did it as shown below;
> >
> > Sub AppendField()
> >
> > DoCmd.RunSQL " ALTER TABLE [NewTable]ADD column_nam char"
> >
> > End Sub
> >
> > So I am going through SQL to do it. Is it possible to do it through VBA
> > only? Is there something in Access VBA like ActiveDocument or ActiveWorkbook
> > in Word and Excel VBA?
> >
> >
> > "BruceS" wrote:
> >
> > > Nedan,
> > >
> > > See http://www.w3schools.com/SQl/sql_alter.asp
> > >
> > > Best,
> > > Bruce
> > >
> > > "Nedan Nedzatra" wrote:
> > >
> > > > Hia!
> > > >
> > > > Good Morning Friends!
> > > >
> > > > I have checked on appending fields to tables on databases that are not
> > > > active but how to do it for the ones that are already open?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database components not active Jim Moore Microsoft Frontpage 3 25th Apr 2006 02:24 AM
Active Directory database location =?Utf-8?B?R29z?= Microsoft Windows 2000 Active Directory 1 25th Feb 2005 09:23 AM
Active Service Database Peter Bauer Microsoft Windows 2000 Security 1 11th Jan 2005 03:35 PM
Active Drirectory Database Export =?Utf-8?B?cmFqc2VraGFyZ3A=?= Microsoft Windows 2000 Active Directory 3 11th Jun 2004 03:39 PM
Database already active Douglas Microsoft Access Security 2 16th Jan 2004 04:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:13 PM.