473,387 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Creating form with one lock table and one edit table

I want to create a form using a table that I created but the foreign key is from the primary key of a locked table. Is this possible to do? If so how? When I create a form it does not allow me to make edits. I don't want to change the information from the locked table but I need the primary key to relate the extra information needed to be entered in the separate table.

The table locked is tblChild, and the primary key is ChildID, the form is frmChildDataEntry, and the other table that I created is tblFamily. I want the name of the child, and DOB to display but not for edit, and then I want to be able to add the Legal guardian, Foster Parents, Mother, Father...etc....Is this possible?
Sep 16 '13 #1
3 1230
zmbd
5,501 Expert Mod 4TB
First, don't lock any of your tables. This just adds a lot of complexity that you don't need.

Second you would benifit from reading:> Database Normalization and Table Structures.

What I would look at would be a parent-form/subform construction; however, you've not given us much information about your database design.
You would set the parent form as a non-editable and let the subform handle your data entry for the related records.
Sep 16 '13 #2
Thanks zmbd for responding....

The Access database that I am linking to is another company database that I am unable to unlock....This database stores most of the data but there are some data that I would like to add for our in-house reports. This is where I created additional tables. The locked tables are tblChild1, tblFamily1, tblEnrollment1, tblEligibility1, tblService1. Then the tables that I added were tblFamilyadd, tblEnrolladd, thbEligadd, tblObjectives, tblServiceadd...each linking the ChildID from the tblChild1 table, and from the tblFamily1 table. Your suggestion to set a parent form that is non-editable sounds like a great idea...and I will try it today. Any other suggestions are greatly appreciated. I am not sure what type of detail on the database design you want to know...please let me know what you would like to know about the design...bare with me I am so new at explaining this.....thanks so much....
Sep 16 '13 #3
zmbd
5,501 Expert Mod 4TB
pacific0786
More like you need to be patient with me (^.-)

Sucks when you don't have control over the whole database.

What you have is basically a split database:Front-End / Back-End (FE/BE)

So, one really does not need to add tables for the ones in the other database... let's name yours as "BE_Company" for back-end-company.

Most likely the easiest is to link to these tables, which I hope you have already mastered.

You can then use these linked tables to provide the information you need.

I'm not really clear about what tables you have in the back end; however, this is what I think you have:
[BE_Company]![tblchild]![...relatedfields...]
[BE_Company]![tblFamily]![...relatedfields...]
[BE_Company]![tblEnrollment]![...relatedfields...][BE_Company]![tblEligibility]![...relatedfields...][BE_Company]![tblService]![...relatedfields...]

I hope that for each of these tables there is a primary key for example:
[BE_Company]![tblchild]![ChildID]
[BE_Company]![tblFamily]![FamilyID]
[BE_Company]![tblEnrollment]![EnrollmentID]
[BE_Company]![tblEligibility]![EligibilityID]
[BE_Company]![tblService]![ServiceID]

These would be the fields I would be interested in handling in my Front-End data base. We can write a query or open a recordset in VBA as needed to pull the Human-readable text.
(in case you're not familiar with the primary key:
Create or modify a primary key - the first section here covers it fairly well. I have gotten into the habit of using the autonumber as my primary key for variety of reasons one of which involved the fact that what was supposed to be a "fixed in stone" system of sample ID's turned out to be a mutable at the whim of the customer ID - however I digress)

Once again with a lot of hope, [BE_Company] is a related database and there is some relationships between each of the tables listed.

OK, from here...
It appears that there is not a table with the names of the parents, guardians, etc... and this is what you would like?


++I warn you now... this is off the top of my head... I don't guarentee that this will work++
Then in your front end I would have:
(please note:
PK = primary key
FK = foriegn key
table names are in quotes
[ ] is a field name
1:M means a table relationship 1 to Many

"tbl_role"
[role_pk] autonumber
[role_description] text(20)

"tbl_parentsguardians"
[parentsguardians_pk] autonumber
[parentsguardians_fname] text(20)
[parentsguardians_Lname] text(40)
[parentsguardians_fk_BECompanyFamily] numeric long 1:M

"tbl_childrelationship"
[childrelationship_pk] autonumber
[childrelationship_fk_BECompanyChild] numeric long 1:M
[childrelationship_fk_parentsguardians] numeric long 1:M
[childrelationship_fk_role] numeric long 1:M
[childrelationship_primary] boolean

I am making some assumptions here that I am expecting both
[BE_Company]![tblchild]![ChildID] and
[BE_Company]![tblFamily]![FamilyID] to be the data type Numeric and Long.
That the [BE_Company]![tblFamily]![...relatedfields...] has some information that relates to the adult.


"tbl_childrelationship" will have a record for each adult related to the child.

So, for the first query, base this on
[BE_Company]![tblchild]![...relatedfields...]

You will use this query to build the parent form, showing only those fields that you want the user to see. I would set the enabled property to false and lock.

Build your second query on "tbl_childrelationship"
Now notice that these are all numeric. When you build your subform, the related fields between the parent and the subform will be [BE_Company]![tblchild]![ChildID] to [childrelationship_fk_BECompanyChild].
The controls you setup will be comboboxes with the control source set to the subform's recordset, and the row source set to the "tbl_parentsguardians" and "tbl_role"

You will need a means to handle the parents and roles not already in the tables.

Please understand we try our best to help; however, there are certain basics that you will have to have some understanding of in order for us to be the most help with your project. This is an intermediate to advanced project so you will have to have a lot of patience with yourself and us. :)
The following will help with the jargon used here:
> Posting Guidelines
> How to ask good questions
> FAQ
> Before Posting (VBA or SQL) Code
Sep 16 '13 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Matt | last post by:
Hi all, We recently upsized two Microsoft Access Databases to SQL. We're using an ADP (2002) as the front end. All the conversion issues have been resolved, except for one: Whenever we...
5
by: Robin Tucker | last post by:
Hi, I need to lock a table so that Inserts are prevented as well as deleted and updates. At present I'm thinking this might do it: SELECT * FROM myTable WITH(UPLOCK) but then again I'm...
0
by: rocsolid | last post by:
Current problem deals with three tables in my database. The "DOCUMENTSLIST" table has a one-to-many relationship to the junction table (DOCUMENTS/PROJECTS) which, in turn, has a many-to-one...
4
by: blee456 | last post by:
I have to create an attendance list for a meeting that will have attendees that are both on the committee and non member participants. My thinking is to create a form that has the member names...
22
by: RayPower | last post by:
I'm having problem with using DAO recordset to append record into a table and subsequent code to update other tables in a transaction. The MDB is Access 2000 with the latest service pack of JET 4....
1
by: sheri | last post by:
I need help!! I am creating a form. I want to add a value from my table. The table name is COLDST. The fields I am working with are in this same table. I want to enter Product ID and have it...
1
by: Stephen Lynch | last post by:
What is the best way to insure that an edit table fields are saved on an exit. For example, I have an edit panel on a page. I do not want to post back on every field, but if an end user goes to...
11
by: Sheau Wei | last post by:
i wish to know how to create a dinamically edit table entries .can u help me ?thanks.
1
by: jl2886 | last post by:
I have two tables in Access, one that contains Active or Pending Policies and another table that contains Rejected policies. I have a form corresponding to the table with a certain variable called...
4
dreamfalcon
by: dreamfalcon | last post by:
Hi! I'm looking for a method to edit table cells. Something similar to Google Docs, that when the user double clicks the cell, it replaces the content with a textbox that grows automatically, and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.