Add Primary Key to 2nd Table (1 Viewer)

jmlight

Registered User.
Local time
Today, 03:16
Joined
Feb 6, 2009
Messages
54
3 Tables
Client
Skills
AssistanceRequested

1. Client table has a field called Client_ID that is auto-numbered automatically by Access and becomes the unique primary key for the client. This table stores personal info (name, address, phone, etc.)

2. Two additional tables are related to Client. They are Skills and AssitanceRequested and they are linked through the field Client_ID. I created a subform on the Client form that accesses the Skills table when a record is selected in the Client form. It displays the many skills associated with this client.

3. When a new client is entered into the Client table, I would like the data entry person to have the option of: 1. Saving the Record and moving on. 2. OPening up a subform to add data to the "Skills" table and/or Open up the AssitanceRequested TAble to add records.

To keep the screen neat and tidy, I don't want both the Skills and AssitanceRequested tables to be open at the same time.

What's the best way to accomplish this?



THanks everyone!
 
Last edited:

John Big Booty

AWF VIP
Local time
Today, 17:16
Joined
Aug 29, 2005
Messages
8,262
You could have two sub forms and just hide the one the user doesn't need and that point. Check this link for the correct syntax for sub forms and their controls.

It would look something like;
Code:
 	Me!Subform1.Form.Visible = False
        Me!Subform2.Form.Visible = True

You just need to work out how you want to activate the code.
 

jmlight

Registered User.
Local time
Today, 03:16
Joined
Feb 6, 2009
Messages
54
so I need to "write" some code? I worked in FoxPro years ago - but I have never written code in Access (I've only worked in Access off and on for a couple of weeks )

Am I biting off too much ?
 

John Big Booty

AWF VIP
Local time
Today, 17:16
Joined
Aug 29, 2005
Messages
8,262
If all you want to do is show and hide a couple of sub forms it shouldn't be too difficult, it's just a mater of deciding how and when to fire the code.
 

Users who are viewing this thread

Top Bottom