PC Review


Reply
Thread Tools Rate Thread

Superclass have only a autonumber.. is it possible?

 
 
Micke__1
Guest
Posts: n/a
 
      7th Mar 2010
Work with IT for many years, and have lately begun looking into DB and MS
Access. So Im quite a rookie in this area.

Ok,
Got a superclass named table1. That class has only one attribute, an ID
which is an auto number.

Then I have to subclasses called table2 and table3. They have the foreign
key to ID, and a couple of other attributes.

When I add a instance to my table2, I want it to add a new auto number in my
superclass, table1. eg a new instance in table1.Is this possible at all?

It seems that I need to first add to table1, and after that use that id in
table2 or table3, and that is not possible here.

any advice here?

br
Micke
 
Reply With Quote
 
 
 
 
Jeff Boyce
Guest
Posts: n/a
 
      7th Mar 2010
Since the value in table2 involves a foreign key pointing back to a record
in table1, oh wait, you don't have a record in table1 yet!

Yes, by all means, start the record in table1, then finish table2 details.

--

Regards

Jeff Boyce
Microsoft Access MVP

Disclaimer: This author may have received products and services mentioned in
this post. Mention and/or description of a product or service herein does
not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"Micke__1" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Work with IT for many years, and have lately begun looking into DB and MS
> Access. So Im quite a rookie in this area.
>
> Ok,
> Got a superclass named table1. That class has only one attribute, an ID
> which is an auto number.
>
> Then I have to subclasses called table2 and table3. They have the foreign
> key to ID, and a couple of other attributes.
>
> When I add a instance to my table2, I want it to add a new auto number in
> my
> superclass, table1. eg a new instance in table1.Is this possible at all?
>
> It seems that I need to first add to table1, and after that use that id in
> table2 or table3, and that is not possible here.
>
> any advice here?
>
> br
> Micke



 
Reply With Quote
 
 
 
 
Piet Linden
Guest
Posts: n/a
 
      10th Mar 2010
FWIW, you might want to read Rebecca Riordan's article on how to do
super/subclassing in Access...

http://www.mvps.org/access/tables/tbl0013.htm

 
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
superclass in geographical database? jonz Microsoft Access Database Table Design 5 18th Mar 2009 02:47 PM
SubClass And SuperClass RajkiranPro Microsoft C# .NET 10 6th Jul 2008 08:02 AM
methods inherited from template superclass Nishith Prabhakar Microsoft VC .NET 1 14th Feb 2006 01:45 PM
Do have have to have Win XP or above to see video with Windows Messenger 5.0? John Jordan Windows XP Messenger 0 16th Sep 2003 03:22 PM
How to handle a superclass' event Help. Steve Long Microsoft C# .NET 3 11th Aug 2003 08:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:26 AM.