473,383 Members | 1,846 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,383 software developers and data experts.

Using a form/sub form to enter data

I have created a data base with 3 tables. The first table has only 2 records and each record is linked to many in table 2.

I have used a form sub form to eneter table 2 data without problems. I just select the name of the record in table 1, and enter everything else in table two. In table two I have used a lookup to table one for the name in table one. This worked and the datasheet in table 2 showed many instances where each of the two names apeared with different equipment atrributed to each one!

For table 3 i wanted to list tasks to be done with each peice of equipment. Say there are 2 cars in table 2, Car 1 for Rob and Car 2 for steve.

I have used the same process, look up fields for Name, and Equipment (looked up from table 2) and created a form/subform where those 2 fields apear on the form, and task details on the sub form.

I have two issues. After entering a heap of data into the sub field under diferent combinations from my query I checked the data sheet for table 3 and noticed the equipment colum was empty.

I also noticed in this view I could enter data using the lookup, but it didnt mater if i had the wrong car with the wrong person. That combination was not a record in table 2.

What have i done wrong?
Jun 27 '19 #1

✓ answered by NeoPa

CwazyRuss:
What have i done wrong?
If I start by saying "Lots." it might have a deleterious effect which isn't deserved. Let's just say that database work is quite different from most other dev work and has quite a steep learning curve at the start. I would suggest you could help yourself on that score by exploring some tutorials (Microsoft Access Tutorials (Strive4Peace)). It would be good use of your time and effort, giving you a bit of a kick-start to get you going on the right track.

The most fundamental problem, I expect, is the design of your tables. Free text fields like names of items should never be used as the primary way of linking or identifying records. Use a Primary Index (or Key - PK) to identify the master table where two link together and also as the Foreign Key (FK) in the table where records need to be linked into the master. Table #3 can be linked into table #1 or table #2, or even to both.

From your explanation we have very little to go on as far as what your database is doing, and I don't think it would be helpful at this stage to discuss what might be happening on your form that's not the best approach. That would only distract from the more fundamental issue of table/database design at this stage. However, when you have that issue resolved we can help further with the form design if you can manage to explain it in terms that indicate what you're doing and what isn't working more clearly. I suggest we leave that for another thread though.

Good luck.

4 1054
NeoPa
32,556 Expert Mod 16PB
CwazyRuss:
What have i done wrong?
If I start by saying "Lots." it might have a deleterious effect which isn't deserved. Let's just say that database work is quite different from most other dev work and has quite a steep learning curve at the start. I would suggest you could help yourself on that score by exploring some tutorials (Microsoft Access Tutorials (Strive4Peace)). It would be good use of your time and effort, giving you a bit of a kick-start to get you going on the right track.

The most fundamental problem, I expect, is the design of your tables. Free text fields like names of items should never be used as the primary way of linking or identifying records. Use a Primary Index (or Key - PK) to identify the master table where two link together and also as the Foreign Key (FK) in the table where records need to be linked into the master. Table #3 can be linked into table #1 or table #2, or even to both.

From your explanation we have very little to go on as far as what your database is doing, and I don't think it would be helpful at this stage to discuss what might be happening on your form that's not the best approach. That would only distract from the more fundamental issue of table/database design at this stage. However, when you have that issue resolved we can help further with the form design if you can manage to explain it in terms that indicate what you're doing and what isn't working more clearly. I suggest we leave that for another thread though.

Good luck.
Jun 27 '19 #2
zmbd
5,501 Expert Mod 4TB
In addition to the tutorial link Neopa gave you I've sent a copy of some resources to your Bytes.com>Inbox
Jun 28 '19 #3
Thanks. I think linking to tbl1 and tbl2 will solve alot of my problems. I am new and the curve is steep. I will keep at it though.
Jul 3 '19 #4
NeoPa
32,556 Expert Mod 16PB
CwazyRuss:
I am new and the curve is steep. I will keep at it though.
You can't say fairer than that. Good luck on your journey.
Jul 3 '19 #5

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

Similar topics

6
by: CJM | last post by:
Can somebody clarify if/how/when a simple form is submitted when the <Enter> key is pressed? As I understood it, if you have a form with a single submit button, if enter is pressed, the form...
4
by: Skully Matjas | last post by:
I am using the following code (created by the wizard) to allow to bring my form to a particular entery. But when I edit the entery (ex: put new information into a blank cell), it puts that record...
6
by: Robin S. | last post by:
Originally I wanted a list box which selects which record is the current one within the same form. Easy enough until Access takes a dump when one is deleted and then someone tries to select it in...
1
by: jbroome | last post by:
I have several tables that contain the same information as Identifying records but then with additional info that differs from table to table. e.g. 1 database of school students with their...
0
by: Jack | last post by:
Windows 2K Pro Access/Excel 2003 Hi there, I have a large number of password protected Excel Workbooks. The files are protected by code that runs when the workbook opens. The code asks the...
2
by: filbennett | last post by:
Hi Everyone, I'm generally unfamiliar with Access form design, but have programmed Cold Fusion applications for a couple of years. I'd like to build a data entry form in Access that allows the...
1
by: kellyj | last post by:
Hi My problem is i have 5 tables with diffirent fields in each, I have IDNum as a common field in each and i want to creat a form to enter data to these tables. any help would be a great help ...
4
by: billa856 | last post by:
Hi, My project is in MS Access. In that I have one Form(DataEntry) which I am using for entering data into the Table(PRODUCTION). Now after entering data in Textboxes when I click on...
4
by: AdamOnAccess | last post by:
I find that I always need to incorporate something like this into my forms, but I've never been happy on how I do it. Can someone advice me on the proper way to do this in Access. Let's say I have...
2
by: maricusmayunga | last post by:
Hi guys, I am brand-new to pointers and c++. I want to do simple program to capture some 5 surnames of people(employees) - using array and pointers. Well I understand a bit of arrays and I know how...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.